Skip to content

Commit 922ed7f

Browse files
committed
add integration test
1 parent 67072ef commit 922ed7f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/test_infrahub_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ async def test_create_branch_async(self, client: InfrahubClient, base_dataset):
142142
task_id = await client.branch.create(branch_name="new-branch-2", wait_until_completion=False)
143143
assert isinstance(task_id, str)
144144

145+
async def test_count(self, client: InfrahubClient, base_dataset):
146+
count = await client.count(kind=TESTING_PERSON)
147+
assert count == 3
148+
149+
async def test_count_with_filter(self, client: InfrahubClient, base_dataset):
150+
count = await client.count(kind=TESTING_PERSON, name__values=["Liam Walker", "Ethan Carter"])
151+
assert count == 2
152+
145153
# async def test_get_generic_filter_source(self, client: InfrahubClient, base_dataset):
146154
# admin = await client.get(kind="CoreAccount", name__value="admin")
147155

0 commit comments

Comments
 (0)