Browse Source

Replace assertEqual(None, *) with assertIsNone in the tests

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

Change-Id: I1260029edaf517795670a824bb2b0ad10eeaa4f9
Partial-Bug: #1280522
tags/3.0.0.0b3^2
zhangyanxian 2 years ago
parent
commit
775246a5a9

+ 1
- 1
designate/tests/unit/test_agent/test_backends/test_djbdns.py View File

@@ -81,7 +81,7 @@ class DjbdnsAgentBackendUnitTestCase(TestCase):
81 81
         self.backend._resolver.query.side_effect = RuntimeError('foo')
82 82
 
83 83
         serial = self.backend.find_zone_serial('example.com')
84
-        self.assertEqual(None, serial)
84
+        self.assertIsNone(serial)
85 85
 
86 86
     @mock.patch('designate.backend.agent_backend.impl_djbdns.execute')
87 87
     def test_create_zone(self, mock_exe):

+ 1
- 1
designate/tests/unit/test_agent/test_backends/test_gdnsd.py View File

@@ -76,7 +76,7 @@ class GdnsdAgentBackendUnitTestCase(TestCase):
76 76
         self.backend._resolver.query.side_effect = RuntimeError('foo')
77 77
 
78 78
         serial = self.backend.find_zone_serial('example.com')
79
-        self.assertEqual(None, serial)
79
+        self.assertIsNone(serial)
80 80
 
81 81
     @mock.patch('designate.backend.agent_backend.impl_gdnsd.os.remove')
82 82
     def test_delete_zone(self, mock_osremove):

Loading…
Cancel
Save