mirror of
https://github.com/django/django.git
synced 2025-09-14 14:35:27 +00:00
Refs #30908 -- Added test for nonexistent path in forms.FilePathField.
This commit is contained in:
parent
ab0fd3f58f
commit
6c6d24a4fe
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ class FilePathFieldTest(SimpleTestCase):
|
||||||
def test_fix_os_paths(self):
|
def test_fix_os_paths(self):
|
||||||
self.assertEqual(fix_os_paths(self.path), ('/filepathfield_test_dir/'))
|
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):
|
def test_no_options(self):
|
||||||
f = FilePathField(path=self.path)
|
f = FilePathField(path=self.path)
|
||||||
expected = [
|
expected = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue