Skip to content

Commit 8402715

Browse files
author
Daniel Herrmann
committed
fix EV tests based on current set of default example data
1 parent d2c26fc commit 8402715

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/test_contact_details.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ def test_get_contact_details(self, ev_connection: EasyvereinAPI):
88
# Check if the response is a list
99
assert isinstance(contact_details, list)
1010

11-
# We should have 6 invoices based on the example data
12-
assert total_count == 10
13-
assert len(contact_details) == 10
11+
# We should have contacts based on the example data
12+
assert total_count == 8
13+
assert len(contact_details) == 8
1414

1515
# Check if all the members are of type Member
1616
for contact_detail in contact_details:

tests/test_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def validate_response(response: tuple[list[Any], int], model: type, num_expected
2424
assert isinstance(instance, model)
2525

2626
def test_filter_invoices(self, ev_connection: EasyvereinAPI):
27-
search = InvoiceFilter(invNumber__in=["10", "11"], canceledInvoice__isnull=True, isDraft=False)
27+
search = InvoiceFilter(invNumber__in=["32", "33"], canceledInvoice__isnull=True, isDraft=False)
2828

2929
TestFilter.validate_response(ev_connection.invoice.get(search=search), Invoice, 2)
3030

@@ -39,7 +39,7 @@ def test_filter_members(self, ev_connection: EasyvereinAPI):
3939

4040
# Case 3: search by name
4141
search = MemberFilter(search="Mustermann")
42-
TestFilter.validate_response(ev_connection.member.get(search=search), Member, 2)
42+
TestFilter.validate_response(ev_connection.member.get(search=search), Member, 1)
4343

4444
# Case 4: test bool, get chairmans
4545
search = MemberFilter(isChairman=True)

tests/test_member.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def test_get_members(self, ev_connection: EasyvereinAPI):
1111
# Check if the response is a list
1212
assert isinstance(members, list)
1313

14-
# We should have 8 members based on the example data
15-
# 5 regular members, 3 requests
16-
assert total_count == 8
17-
assert len(members) == 8
14+
# We should have 5 members based on the example data
15+
# 4 regular members, 1 requests
16+
assert total_count == 5
17+
assert len(members) == 5
1818

1919
# Check if all the members are of type Member
2020
for member in members:
@@ -28,7 +28,7 @@ def test_members_with_query(self, ev_connection: EasyvereinAPI):
2828

2929
members, total_count = ev_connection.member.get(query=query, limit=2)
3030
assert len(members) == 2
31-
assert total_count == 8
31+
assert total_count == 5
3232

3333
for member in members:
3434
assert isinstance(member, Member)

0 commit comments

Comments
 (0)