diff --git a/tests/forms_tests/field_tests/test_filepathfield.py b/tests/forms_tests/field_tests/test_filepathfield.py index 44f6aff521..2b9683ed84 100644 --- a/tests/forms_tests/field_tests/test_filepathfield.py +++ b/tests/forms_tests/field_tests/test_filepathfield.py @@ -41,6 +41,10 @@ class FilePathFieldTest(SimpleTestCase): def test_fix_os_paths(self): self.assertEqual(fix_os_paths(self.path), ('/filepathfield_test_dir/')) + def test_nonexistent_path(self): + with self.assertRaisesMessage(FileNotFoundError, 'nonexistent'): + FilePathField(path='nonexistent') + def test_no_options(self): f = FilePathField(path=self.path) expected = [