Replace assertEqual(None, *) with assertIsNone in tests

Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I98261ef7cca06447ea9d443a2c287c046f380f77
Closes-Bug: #1280522
changes/08/319908/1
sharat.sharma 6 years ago
parent 22abaa9c3a
commit 164a802718
  1. 2
      watcher/tests/api/v1/test_actions_plans.py
  2. 2
      watcher/tests/api/v1/test_audits.py
  3. 2
      watcher/tests/api/v1/test_types.py

@ -163,7 +163,7 @@ class TestListActionPlan(api_base.FunctionalTest):
for id_ in range(0, 2):
action_plan = response['action_plans'][id_]
self.assertEqual(None, action_plan['audit_uuid'])
self.assertIsNone(action_plan['audit_uuid'])
for id_ in range(2, 4):
action_plan = response['action_plans'][id_]

@ -306,7 +306,7 @@ class TestListAudit(api_base.FunctionalTest):
for id_ in range(0, 2):
audit = response['audits'][id_]
self.assertEqual(None, audit['audit_template_uuid'])
self.assertIsNone(audit['audit_template_uuid'])
for id_ in range(2, 4):
audit = response['audits'][id_]

@ -234,7 +234,7 @@ class TestJsonType(base.TestCase):
value = vt.validate({'foo': 'bar'})
self.assertEqual({'foo': 'bar'}, value)
value = vt.validate(None)
self.assertEqual(None, value)
self.assertIsNone(value)
def test_invalid_values(self):
vt = types.jsontype

Loading…
Cancel
Save