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: I384fbe8722af07bcaa4e2610384446751a8072bf
Closes-bug: #1280522
tags/2.0.0
Shuquan Huang 3 years ago
parent
commit
20d298dc7a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      glanceclient/tests/unit/v2/test_images.py

+ 1
- 1
glanceclient/tests/unit/v2/test_images.py View File

@@ -870,7 +870,7 @@ class TestController(testtools.TestCase):
870 870
         resp = utils.FakeResponse(headers={}, status_code=204)
871 871
         self.controller.http_client.get = mock.Mock(return_value=(resp, None))
872 872
         body = self.controller.data('image_id')
873
-        self.assertEqual(None, body)
873
+        self.assertIsNone(body)
874 874
 
875 875
     def test_update_replace_prop(self):
876 876
         image_id = '3a4560a1-e585-443e-9b39-553b46ec92d1'

Loading…
Cancel
Save