Skip to content

Commit

Permalink
FSPT-208 assert the expected tools/format used on application dates
Browse files Browse the repository at this point in the history
There are a lot of steps between configuring that date format we would
expect to see and JSON being set in a separate (assess) table.

Add a regression test against this changing formats.
  • Loading branch information
sfount committed Jan 8, 2025
1 parent f6ee03a commit cf5c9d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/application_store_tests/test_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ def test_submit_route_success(
assert assessment_record
assert assessment_record.jsonb_blob["forms"]

try:
datetime.strptime(assessment_record.jsonb_blob["date_submitted"], "%Y-%m-%dT%H:%M:%S.%f")
except ValueError as e:
pytest.fail(f"Unexpected serialised application date format {e}")


def test_submit_route_submit_error(flask_test_client, seed_application_records, mocker, mock_successful_location_call):
target_application = seed_application_records[0]
Expand Down

0 comments on commit cf5c9d7

Please sign in to comment.