Skip to content

Commit

Permalink
fix: breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke committed Jan 11, 2024
1 parent a57e24c commit 074a59e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/benefit/applications/tests/test_applications_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def test_application_post_success(api_client, application):
)
assert new_application.official_company_postcode == new_application.company.postcode
assert new_application.official_company_city == new_application.company.city
audit_event = (
audit_models.AuditLogEntry.objects.all().first().message["audit_event"]
)

audit_event = audit_models.AuditLogEntry.objects.last().message["audit_event"]

assert audit_event["status"] == "SUCCESS"
assert audit_event["target"]["id"] == str(Application.objects.all().first().id)
assert audit_event["operation"] == "CREATE"
Expand Down Expand Up @@ -617,9 +617,9 @@ def test_application_put_edit_fields(api_client, application):
) # normalized format
application.refresh_from_db()
assert application.company_contact_person_phone_number == "0505658789"
audit_event = (
audit_models.AuditLogEntry.objects.all().first().message["audit_event"]
)

audit_event = audit_models.AuditLogEntry.objects.last().message["audit_event"]

assert audit_event["status"] == "SUCCESS"
assert audit_event["target"]["id"] == str(application.id)
assert audit_event["operation"] == "UPDATE"
Expand Down

0 comments on commit 074a59e

Please sign in to comment.