Skip to content

Commit 73b6148

Browse files
committed
test(lua.endpoints): fix the assertion for the tags tests
1 parent d40d645 commit 73b6148

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/lua/endpoints/test_skip.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ def test_skip_big_blind(self, client: httpx.Client) -> None:
3434
)
3535
assert gamestate["state"] == "BLIND_SELECT"
3636
assert gamestate["blinds"]["big"]["status"] == "SELECT"
37-
assert gamestate["tags"][0]["key"] == "tag_polychrome"
37+
assert {"tag_polychrome"} == set(k["key"] for k in gamestate["tags"])
3838
response = api(client, "skip", {})
3939
gamestate = assert_gamestate_response(response, state="BLIND_SELECT")
4040
assert gamestate["blinds"]["big"]["status"] == "SKIPPED"
4141
assert gamestate["blinds"]["boss"]["status"] == "SELECT"
42-
assert gamestate["tags"][0]["key"] == "tag_polychrome"
43-
assert "tag_investment" not in gamestate["tags"] # because it used immediately
42+
assert {"tag_polychrome", "tag_investment"} == set(
43+
k["key"] for k in gamestate["tags"]
44+
)
4445

4546
def test_skip_big_boss(self, client: httpx.Client) -> None:
4647
"""Test skipping Boss in BLIND_SELECT state."""
@@ -50,7 +51,9 @@ def test_skip_big_boss(self, client: httpx.Client) -> None:
5051
assert gamestate["state"] == "BLIND_SELECT"
5152
assert gamestate["blinds"]["boss"]["status"] == "SELECT"
5253
assert gamestate["tags"][0]["key"] == "tag_polychrome"
53-
assert "tag_investment" not in gamestate["tags"] # because it used immediately
54+
assert {"tag_polychrome", "tag_investment"} == set(
55+
k["key"] for k in gamestate["tags"]
56+
)
5457
assert_error_response(
5558
api(client, "skip", {}),
5659
"NOT_ALLOWED",

0 commit comments

Comments
 (0)