Browse Source

Fix unit tests broken by requests-mock

Now requests-mock records request url in log[1], so it is
invalid to check that the logger output does NOT contain
request url.

Also, fix url passed to request mock as now it requires
complete url is passed

[1] https://github.com/jamielennox/requests-mock/pull/93

Change-Id: I4bab30a6705b7cab6b5a569dd61c442263e39995
tags/3.21.0
Takashi Kajinami 2 weeks ago
parent
commit
27d4376ea5

+ 0
- 2
keystoneclient/tests/unit/test_session.py View File

@@ -828,7 +828,6 @@ class SessionAuthTests(utils.TestCase):
828 828
         self.assertIn(list(response.keys())[0], output)
829 829
         self.assertIn(list(response.values())[0], output)
830 830
 
831
-        self.assertNotIn(self.TEST_URL, self.logger.output)
832 831
         self.assertNotIn(list(response.keys())[0], self.logger.output)
833 832
         self.assertNotIn(list(response.values())[0], self.logger.output)
834 833
 
@@ -1026,7 +1025,6 @@ class AdapterTest(utils.TestCase):
1026 1025
         self.assertIn(list(response.keys())[0], output)
1027 1026
         self.assertIn(list(response.values())[0], output)
1028 1027
 
1029
-        self.assertNotIn(self.TEST_URL, self.logger.output)
1030 1028
         self.assertNotIn(list(response.keys())[0], self.logger.output)
1031 1029
         self.assertNotIn(list(response.values())[0], self.logger.output)
1032 1030
 

+ 1
- 1
keystoneclient/tests/unit/v3/test_role_assignments.py View File

@@ -265,7 +265,7 @@ class RoleAssignmentsTests(utils.ClientTestCase, utils.CrudTests):
265 265
         ref_list = self.TEST_ALL_RESPONSE_LIST
266 266
         self.stub_entity('GET',
267 267
                          [self.collection_key,
268
-                          '?include_names'],
268
+                          '?include_names=True'],
269 269
                          entity=ref_list)
270 270
 
271 271
         returned_list = self.manager.list(include_names=True)

Loading…
Cancel
Save