Skip to content
Snippets Groups Projects
Commit dfa34148 authored by Martin Burchell's avatar Martin Burchell
Browse files

Added an explicit test for null date

parent 2f34207b
No related branches found
No related tags found
No related merge requests found
......@@ -51,3 +51,14 @@ def test_date_fields_are_converted_to_datetimes():
)
assert stored_date == retrieved_item[date_field]
@pytest.mark.django_db
def test_null_date_field_not_converted_to_datetime():
ItemFactory(timestamp=None)
retrieved_items = transport.items.list()
[retrieved_item] = retrieved_items
assert retrieved_item['timestamp'] is None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment