Skip to content

Commit

Permalink
update test_conda_store_server_url_prefix (#993)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabalafou authored Nov 19, 2024
1 parent f2680f5 commit 8f65cd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions conda-store-server/tests/test_traitlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ def test_conda_store_server_url_prefix(conda_store_server):
client = TestClient(conda_store_server.init_fastapi_app())
response = client.get("/", follow_redirects=False)
assert response.status_code == 307
assert response.headers.get("location").endswith("/a/test/prefix/ui/")

response = client.get("/a/test/prefix/", follow_redirects=False)
assert response.status_code == 200
assert response.status_code == 307
assert response.headers.get("location").endswith("/a/test/prefix/ui/")

conda_store_server.url_prefix = "/"
client = TestClient(conda_store_server.init_fastapi_app())
response = client.get("/", follow_redirects=False)
assert response.status_code == 200
assert response.status_code == 307
assert response.headers.get("location") == "http://testserver/ui/"


def test_conda_store_server_templates(conda_store_server):
Expand Down

0 comments on commit 8f65cd2

Please sign in to comment.