Skip to content

Commit

Permalink
Merge pull request #1872 from ASFHyP3/dependabot/pip/werkzeug-3.0.0
Browse files Browse the repository at this point in the history
Bump werkzeug from 2.3.7 to 3.0.0
  • Loading branch information
jtherrmann authored Oct 19, 2023
2 parents 3e5933f + a627f17 commit d2969de
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-apps-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ requests==2.31.0
serverless_wsgi==3.0.3
shapely==2.0.1
strict-rfc3339==0.7
Werkzeug==2.3.7
Werkzeug==3.0.0
./lib/dynamo/
6 changes: 5 additions & 1 deletion tests/test_api/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def client():


def login(client, username=DEFAULT_USERNAME):
client.set_cookie('localhost', AUTH_COOKIE, auth.get_mock_jwt_cookie(username, lifetime_in_seconds=10_000))
client.set_cookie(
domain='localhost',
key=AUTH_COOKIE,
value=auth.get_mock_jwt_cookie(username, lifetime_in_seconds=10_000)
)


def make_job(granules=None, name='someName', job_type='RTC_GAMMA', parameters=None):
Expand Down
12 changes: 10 additions & 2 deletions tests/test_api/test_api_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@ def test_not_logged_in(client):

def test_invalid_cookie(client):
for uri in ENDPOINTS:
client.set_cookie('localhost', AUTH_COOKIE, 'garbage I say!!! GARGBAGE!!!')
client.set_cookie(
domain='localhost',
key=AUTH_COOKIE,
value='garbage I say!!! GARGBAGE!!!'
)
response = client.get(uri)
assert response.status_code == HTTPStatus.UNAUTHORIZED


def test_expired_cookie(client):
for uri in ENDPOINTS:
client.set_cookie('localhost', AUTH_COOKIE, auth.get_mock_jwt_cookie('user', lifetime_in_seconds=-1))
client.set_cookie(
domain='localhost',
key=AUTH_COOKIE,
value=auth.get_mock_jwt_cookie('user', lifetime_in_seconds=-1)
)
response = client.get(uri)
assert response.status_code == HTTPStatus.UNAUTHORIZED

Expand Down

0 comments on commit d2969de

Please sign in to comment.