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: Ifcaeba48ff3606d3805343923378d0e58f68a2b9
Closes-bug: #1280522
tags/2.0.0
Shuquan Huang 3 years ago
parent
commit
940b610af0
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      designateclient/tests/v2/test_timeout.py

+ 4
- 4
designateclient/tests/v2/test_timeout.py View File

@@ -77,15 +77,15 @@ class TestTimeout(v2.APIV2TestCase, v2.CrudMixin):
77 77
     def test_no_timeout(self):
78 78
         session = create_session(timeout=None)
79 79
         client = Client(session=session)
80
-        self.assertEqual(None, session.timeout)
81
-        self.assertEqual(None, client.session.timeout)
80
+        self.assertIsNone(session.timeout)
81
+        self.assertIsNone(client.session.timeout)
82 82
         self._call_request_and_check_timeout(client, None)
83 83
 
84 84
     def test_timeout_in_session(self):
85 85
         session = create_session(timeout=1)
86 86
         client = Client(session=session)
87 87
         self.assertEqual(1, session.timeout)
88
-        self.assertEqual(None, client.session.timeout)
88
+        self.assertIsNone(client.session.timeout)
89 89
         self._call_request_and_check_timeout(client, 1)
90 90
 
91 91
     def test_timeout_override_session_timeout(self):
@@ -100,7 +100,7 @@ class TestTimeout(v2.APIV2TestCase, v2.CrudMixin):
100 100
         session = create_session(timeout=1)
101 101
         client = Client(session=session)
102 102
         self.assertEqual(1, session.timeout)
103
-        self.assertEqual(None, client.session.timeout)
103
+        self.assertIsNone(client.session.timeout)
104 104
         self._call_request_and_check_timeout(client, 1)
105 105
 
106 106
         session.timeout = 2

Loading…
Cancel
Save