Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up: remove unused code #847

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,13 +719,6 @@ def test_try_download_from_bucket_invalid_range(
mock_check_in_region_request.assert_called_once()


@mock.patch(f"{MODULE}.JWT_COOKIE_NAME", "asf-cookie")
def test_get_jwt_field():
assert app.get_jwt_field({"asf-cookie": {"foo": "bar"}}, "foo") == "bar"
assert app.get_jwt_field({"asf-cookie": {}}, "foo") is None
assert app.get_jwt_field({}, "foo") is None


@mock.patch(f"{MODULE}.get_urs_url", autospec=True)
def test_root(mock_get_urs_url, mock_retrieve_secret, mock_make_html_response, client):
del mock_retrieve_secret
Expand Down
5 changes: 0 additions & 5 deletions thin_egress_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,6 @@ def try_download_from_bucket(bucket, filename, user_profile, headers: dict, api_
return make_html_response(template_vars, headers, 404, "error.html")


@with_trace()
def get_jwt_field(cookievar: dict, fieldname: str):
return cookievar.get(JWT_COOKIE_NAME, {}).get(fieldname, None)


@app.route("/")
@with_trace(context={})
def root():
Expand Down