Ticket #30908: test-30908.diff

File test-30908.diff, 655 bytes (added by Mariusz Felisiak, 5 years ago)

Regression test.

  • tests/forms_tests/field_tests/test_filepathfield.py

    diff --git a/tests/forms_tests/field_tests/test_filepathfield.py b/tests/forms_tests/field_tests/test_filepathfield.py
    index 44f6aff521..a74a4c09a8 100644
    a b class FilePathFieldTest(SimpleTestCase):  
    3535    ]
    3636    path = os.path.join(PATH, 'filepathfield_test_dir') + '/'
    3737
     38    def test_nonexistent_path(self):
     39        f = FilePathField(path='nonexistent')
     40        self.assertChoices(f, [])
     41
    3842    def assertChoices(self, field, expected_choices):
    3943        self.assertEqual(fix_os_paths(field.choices), expected_choices)
    4044
Back to Top