Skip to content

Commit

Permalink
Fix broken assert of Mock object's not_called property
Browse files Browse the repository at this point in the history
Resolves error during test:

AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute.
  • Loading branch information
dsotirho-ucsc committed Nov 7, 2024
1 parent caac899 commit 9a329dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/service/test_manifest_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ def test(self,
self.assertNotEqual(token_url, response.json()['Location'])

assert signed_manifest_key.encode() == manifest_url.path.segments[-1]
assert verify_manifest_key.not_called
assert not verify_manifest_key.called
verify_manifest_key.return_value = manifest_key
assert get_cached_manifest_with_key.not_called
assert not get_cached_manifest_with_key.called
get_cached_manifest_with_key.return_value = manifest
response = requests.get(str(manifest_url), allow_redirects=False)
self.assertEqual(302, response.status_code)
Expand Down

0 comments on commit 9a329dc

Please sign in to comment.