Drop use of invalid assert_called_once call
assert_called_once is not a valid mock assertion; switch to assessing the call_count == 1 instead. Change-Id: I906fd9784cb7207bb1a52ac8a63108565c2c3e9f
This commit is contained in:
@@ -284,7 +284,7 @@ class ResourceTest(test.TestCase):
|
|||||||
self.assertEqual('done', response)
|
self.assertEqual('done', response)
|
||||||
# The following check verifies that mask_password was called with
|
# The following check verifies that mask_password was called with
|
||||||
# the decoded body.
|
# the decoded body.
|
||||||
masker.assert_called_once()
|
self.assertEqual(1, masker.call_count)
|
||||||
decoded_body = encodeutils.safe_decode(
|
decoded_body = encodeutils.safe_decode(
|
||||||
serialized_body, errors='ignore')
|
serialized_body, errors='ignore')
|
||||||
self.assertIn(decoded_body, masker.call_args[0][0])
|
self.assertIn(decoded_body, masker.call_args[0][0])
|
||||||
|
|||||||
Reference in New Issue
Block a user