Skip to content

Commit d8d2199

Browse files
committed
fix(humanitix): correct get_tags integration test assertions
The Humanitix API returns the tag list shape directly (tags, total, page, pageSize) without a wrapping 'result' key. Drop the bogus 'result' assertion in test_returns_tags_list and remove the unreachable 'if data.get("result") is True:' guards in test_tags_structure and test_pagination_params_respected so the structural and pagination checks are actually executed.
1 parent 3d9f33e commit d8d2199

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

humanitix/tests/test_humanitix_integration.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,14 @@ async def test_returns_tags_list(self, live_context):
6868
result = await humanitix.execute_action("get_tags", {"page_size": 5}, live_context)
6969

7070
data = result.result.data
71-
assert "result" in data
7271
assert "tags" in data
7372
assert isinstance(data["tags"], list)
7473

7574
async def test_tags_structure(self, live_context):
7675
result = await humanitix.execute_action("get_tags", {"page_size": 5}, live_context)
7776

7877
data = result.result.data
79-
if data.get("result") is True and data["tags"]:
78+
if data["tags"]:
8079
tag = data["tags"][0]
8180
assert "_id" in tag
8281
assert "name" in tag
@@ -85,8 +84,7 @@ async def test_pagination_params_respected(self, live_context):
8584
result = await humanitix.execute_action("get_tags", {"page_size": 2, "page": 1}, live_context)
8685

8786
data = result.result.data
88-
if data.get("result") is True:
89-
assert len(data["tags"]) <= 2
87+
assert len(data["tags"]) <= 2
9088

9189

9290
class TestGetOrders:

0 commit comments

Comments
 (0)