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: I429c8ab3eb4e79a7556ea6f966dd7aa32ee9b86d
Closes-bug: #1280522
tags/1.2.2
Shuquan Huang 3 years ago
parent
commit
20b4700893

+ 2
- 2
congressclient/tests/v1/test_datasource.py View File

@@ -321,7 +321,7 @@ class TestDeleteDatasourceDriver(common.TestCongressBase):
321 321
                                return_value="id"):
322 322
             result = cmd.take_action(parsed_args)
323 323
         mocker.assert_called_with("id")
324
-        self.assertEqual(None, result)
324
+        self.assertIsNone(result)
325 325
 
326 326
 
327 327
 class TestDatasourceRequestRefresh(common.TestCongressBase):
@@ -341,4 +341,4 @@ class TestDatasourceRequestRefresh(common.TestCongressBase):
341 341
                                return_value="id"):
342 342
             result = cmd.take_action(parsed_args)
343 343
         mocker.assert_called_with("id", {})
344
-        self.assertEqual(None, result)
344
+        self.assertIsNone(result)

+ 2
- 2
congressclient/tests/v1/test_policy.py View File

@@ -97,7 +97,7 @@ class TestDeletePolicy(common.TestCongressBase):
97 97
             result = cmd.take_action(parsed_args)
98 98
 
99 99
         mocker.assert_called_with(policy_id)
100
-        self.assertEqual(None, result)
100
+        self.assertIsNone(result)
101 101
 
102 102
 
103 103
 class TestCreatePolicyRule(common.TestCongressBase):
@@ -173,7 +173,7 @@ class TestDeletePolicyRule(common.TestCongressBase):
173 173
             result = cmd.take_action(parsed_args)
174 174
 
175 175
         mocker.assert_called_with(policy_name, rule_id)
176
-        self.assertEqual(None, result)
176
+        self.assertIsNone(result)
177 177
 
178 178
 
179 179
 class TestListPolicyRules(common.TestCongressBase):

Loading…
Cancel
Save