Don't explode on invalid dates

This commit is contained in:
Daniel Quinn committed 2018-04-22 16:27:43 +01:00
1 parent 676c8f9fa7
commit 7223ea3c3f
2 files changed
+9 -1

No files matched your search

+5
View File
@@ -359,3 +359,8 @@ class TestFieldPermutations(TestCase):
}
self._test_guessed_attributes(
template.format(**spec), **spec)
def test_invalid_date_format(self):
info = FileInfo.from_path("/path/to/06112017Z - title.pdf")
self.assertEqual(info.title, "title")
self.assertIsNone(info.created)