Browse Source

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
tags/0.28.0
sharat.sharma 3 years ago
parent
commit
164a802718

+ 1
- 1
watcher/tests/api/v1/test_actions_plans.py View File

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

+ 1
- 1
watcher/tests/api/v1/test_audits.py View File

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

+ 1
- 1
watcher/tests/api/v1/test_types.py View File

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

Loading…
Cancel
Save