Skip to content

Commit f5471f7

Browse files
fix: test cases
1 parent 6bef0f2 commit f5471f7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/unit/test_work_items.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,28 @@ def test_list_work_items_with_pql_filter(
4343
priority="high",
4444
),
4545
)
46+
47+
created_item_2 = client.work_items.create(
48+
workspace_slug,
49+
project.id,
50+
CreateWorkItem(
51+
name="pql-filter-low-priority-item",
52+
priority="low",
53+
),
54+
)
4655
params = WorkItemQueryParams(pql='priority IN ("high")')
4756
response = client.work_items.list(workspace_slug, project.id, params=params)
4857
assert response is not None
4958
assert hasattr(response, "results")
5059
assert isinstance(response.results, list)
5160
assert len(response.results) > 0
5261
result_ids = [item.id for item in response.results]
62+
5363
assert created_item.id in result_ids
64+
assert created_item_2.id not in result_ids
65+
66+
client.work_items.delete(workspace_slug, project.id, created_item.id)
67+
client.work_items.delete(workspace_slug, project.id, created_item_2.id)
5468

5569
def test_search_work_items(self, client: PlaneClient, workspace_slug: str) -> None:
5670
"""Test searching work items."""

0 commit comments

Comments
 (0)