def test_format_date_invalid(invalid_date): res = format_date(invalid_date) assert res is None
def test_format_date_valid(): date = '2102-01-01 12:12' res = format_date(date) assert res == datetime.datetime(2102, 1, 1, 12, 12)