def test_deserialize_datetime_ko(mock_import): """Check that _deserialize_datetime function correctly handles expected exceptions""" result = util.deserialize_datetime('2020-06-24 17:02:53.034374') assert not isinstance(result, date)
def test_deserialize_datetime(): """Check that _deserialize_datetime function transforms string into datetime""" result = util.deserialize_datetime('2020-06-24 17:02:53.034374') assert isinstance(result, datetime)