Browse Source

Replace assertEqual(None,*) with assertIsNone

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

Closes-Bug: #1280522

Change-Id: I950881a51053d83762c941d813da6bbf9f8578c9
tags/9.0.0.0b2
LiuNanke 3 years ago
parent
commit
aed4d66098

+ 1
- 1
openstack_dashboard/dashboards/project/access_and_security/floating_ips/tests.py View File

@@ -269,7 +269,7 @@ class FloatingIpViewTests(test.TestCase):
269 269
         self.assertEqual(set(['ajax-modal']), set(allocate_action.classes))
270 270
         self.assertEqual('Allocate IP To Project',
271 271
                          six.text_type(allocate_action.verbose_name))
272
-        self.assertEqual(None, allocate_action.policy_rules)
272
+        self.assertIsNone(allocate_action.policy_rules)
273 273
 
274 274
         url = 'horizon:project:access_and_security:floating_ips:allocate'
275 275
         self.assertEqual(url, allocate_action.url)

+ 1
- 1
openstack_dashboard/dashboards/project/access_and_security/tests.py View File

@@ -219,7 +219,7 @@ class SecurityGroupTabTests(test.TestCase):
219 219
 
220 220
         self.assertEqual('Create Security Group',
221 221
                          six.text_type(create_action.verbose_name))
222
-        self.assertEqual(None, create_action.policy_rules)
222
+        self.assertIsNone(create_action.policy_rules)
223 223
         self.assertEqual(set(['ajax-modal']), set(create_action.classes))
224 224
 
225 225
         url = 'horizon:project:access_and_security:security_groups:create'

Loading…
Cancel
Save