Skip to content

Commit

Permalink
Reuse nested function
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Dec 12, 2024
1 parent c174058 commit 83367e8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions test/service/test_manifest_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,14 @@ def request(method: str, url: furl, *, expect: int) -> furl:
url = initial_url.copy()
filters = json.loads(url.args['filters'])
url.args['filters'] = json.dumps(dict(reversed(filters.items())))
response = requests.put(url=str(url), allow_redirects=False)
url = request('PUT', url, expect=301)
_sfn.reset_mock(side_effect=True)
if fetch:
self.assertEqual(200, response.status_code)
self.assertEqual(301, response.json()['Status'])
else:
self.assertEqual(301, response.status_code)
# FIXME: 404 from S3 when re-requesting manifest after it expired
# https://github.com/DataBiosphere/azul/issues/6441
if False:
self.assertNotEqual(token_url, response.json()['Location'])
if True:
self.assertEqual(token_url, url)
else:
self.assertNotEqual(token_url, url)

Check warning

Code scanning / CodeQL

Unreachable code Warning test

This statement is unreachable.

assert signed_manifest_key.encode() == manifest_url.path.segments[-1]
assert not verify_manifest_key.called
Expand Down

0 comments on commit 83367e8

Please sign in to comment.