Skip to content

Commit cf4dccc

Browse files
committed
Fixing test of customer can be listed to take guest in account
1 parent 89c9069 commit cf4dccc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/api/test_customers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def test_that_a_customer_can_be_read(
6565
assert dateutil.parser.parse(data["creation_utc"]) == customer.creation_utc
6666

6767

68-
async def test_that_customers_can_be_listed(
68+
async def test_that_all_customers_including_guests_can_be_listed(
6969
client: TestClient,
7070
container: Container,
7171
) -> None:
@@ -89,7 +89,7 @@ async def test_that_customers_can_be_listed(
8989

9090
customers = client.get("/customers").raise_for_status().json()
9191

92-
assert len(customers) == 2
92+
assert len(customers) == 3
9393
assert any(
9494
first_name == customer["name"] and first_extra == customer["extra"]
9595
for customer in customers
@@ -98,6 +98,7 @@ async def test_that_customers_can_be_listed(
9898
second_name == customer["name"] and second_extra == customer["extra"]
9999
for customer in customers
100100
)
101+
assert any("<guest>" == customer["name"] for customer in customers)
101102

102103

103104
async def test_that_a_customer_can_be_updated_with_a_new_name(

0 commit comments

Comments
 (0)