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
changes/28/356228/6
zhangyanxian 6 years ago committed by Alexander Monk
parent fc828eb646
commit 775246a5a9
  1. 2
      designate/tests/unit/test_agent/test_backends/test_djbdns.py
  2. 2
      designate/tests/unit/test_agent/test_backends/test_gdnsd.py

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

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

Loading…
Cancel
Save