Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
toorhamza committed Aug 22, 2023
1 parent 7428af1 commit 5b26d16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions leasing/tests/api/test_lease_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
@pytest.mark.parametrize("value", ["A1128-1", " A1128-1", "A1128-1 ", " A1128-1 "])
@pytest.mark.parametrize("param_name", ["search", "identifier"])
def test_search_finds_one_lease_by_full_identifier(
django_db_setup, admin_client, lease_factory, value, param_name
django_db_setup, admin_client, lease_factory, decision_factory, value, param_name
):
lease = lease_factory(
type_id=1, municipality_id=1, district_id=29, notice_period_id=1
)
decision_factory(lease_id=lease.id)
lease_factory(type_id=1, municipality_id=1, district_id=1, notice_period_id=1)

response = admin_client.get(reverse("lease-list"), data={param_name: value})
Expand All @@ -24,11 +25,12 @@ def test_search_finds_one_lease_by_full_identifier(
@pytest.mark.django_db
@pytest.mark.parametrize("param_name", ["search", "identifier"])
def test_search_finds_one_lease_by_full_identifier_where_type_has_two_letters(
django_db_setup, admin_client, lease_factory, param_name
django_db_setup, admin_client, lease_factory, decision_factory, param_name
):
lease = lease_factory(
type_id=33, municipality_id=1, district_id=1, notice_period_id=1
)
decision_factory(lease_id=lease.id)
lease_factory(type_id=33, municipality_id=1, district_id=2, notice_period_id=1)

response = admin_client.get(reverse("lease-list"), data={param_name: "MA100-1"})
Expand Down

0 comments on commit 5b26d16

Please sign in to comment.