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: Idd271edb45dafed10aad255267ff0b9722cabe2d
Closes-bug: #1280522
tags/2.0.0
Shuquan Huang 3 years ago
parent
commit
dbc444db90
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      troveclient/tests/test_base.py
  2. 1
    1
      troveclient/tests/test_configurations.py

+ 1
- 1
troveclient/tests/test_base.py View File

@@ -301,7 +301,7 @@ class MangerPaginationTests(ManagerTest):
301 301
         self.manager.api.client.get.assert_called_with(self.next_url)
302 302
         self.assertEqual('p3', resp.items[0].foo)
303 303
         self.assertEqual('p4', resp.items[1].foo)
304
-        self.assertEqual(None, resp.next)
304
+        self.assertIsNone(resp.next)
305 305
         self.assertEqual([], resp.links)
306 306
         self.assertTrue(isinstance(resp, common.Paginated))
307 307
 

+ 1
- 1
troveclient/tests/test_configurations.py View File

@@ -248,4 +248,4 @@ class MgmtConfigurationParametersTest(testtools.TestCase):
248 248
         self.config_params.delete('id', 'param_id')
249 249
         self.assertEqual('/mgmt/datastores/versions/id/parameters/param_id',
250 250
                          self._url)
251
-        self.assertEqual(None, self._body)
251
+        self.assertIsNone(self._body)

Loading…
Cancel
Save