Skip to content

Commit

Permalink
tests: fix failing tests after last rewrite of cache
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed Jan 30, 2025
1 parent 6ca2131 commit 67196e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def mocked_redis_client(*args, **kwargs):
settings.public_path = Path(test_path) / "public"
settings.async_queue = False
settings.upstream_url = "http://localhost:8123"
settings.server_stats = "stats"
for branch in "1.2", "19.07", "21.02":
if branch not in settings.branches:
settings.branches[branch] = {"path": "releases/{version}"}
Expand Down
13 changes: 11 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,12 @@ def test_api_build_bad_target(client):
)
assert response.status_code == 400
data = response.json()
assert data.get("detail") == "Unsupported target: testtarget/testsubtargetbad"
assert (
data.get("detail")
== "Unsupported target: testtarget/testsubtargetbad. The requested "
"target was either dropped, is still being built or is not supported "
"by the selected version. Please check the forums or try again later."
)


def test_api_build_head_get(client):
Expand Down Expand Up @@ -625,7 +630,11 @@ def test_api_build_bad_profile(client):
assert response.status_code == 400

data = response.json()
assert data["detail"] == "Unsupported profile: Foobar"
assert (
data["detail"] == "Unsupported profile: Foobar. The requested "
"profile was either dropped or never existed. Please check the forums "
"for more information."
)


def test_api_build_defaults_empty(client):
Expand Down

0 comments on commit 67196e8

Please sign in to comment.