Skip to content

Commit

Permalink
Replace not_called assert statement with assert_not_called()
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 Sep 20, 2024
1 parent 869ee69 commit 3c8a04f
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
verify_manifest_key.assert_not_called()
verify_manifest_key.return_value = manifest_key
assert get_cached_manifest_with_key.not_called
get_cached_manifest_with_key.assert_not_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 3c8a04f

Please sign in to comment.