Fixed #26017 -- Removed a dependency on the name of the top-level tests directory.

This commit is contained in:
Raphaël Hertzog 2015-12-30 18:19:21 +01:00 committed by Tim Graham
parent 4b2dcfe04f
commit e0f370364a
1 changed files with 7 additions and 7 deletions

View File

@ -1574,7 +1574,7 @@ class FieldsTests(SimpleTestCase):
f = FilePathField(path=path, allow_folders=True, allow_files=False)
f.choices.sort()
expected = [
('/tests/forms_tests/tests/filepath_test_files/directory', 'directory'),
('/forms_tests/tests/filepath_test_files/directory', 'directory'),
]
for exp, got in zip(expected, fix_os_paths(f.choices)):
self.assertEqual(exp[1], got[1])
@ -1583,12 +1583,12 @@ class FieldsTests(SimpleTestCase):
f = FilePathField(path=path, allow_folders=True, allow_files=True)
f.choices.sort()
expected = [
('/tests/forms_tests/tests/filepath_test_files/.dot-file', '.dot-file'),
('/tests/forms_tests/tests/filepath_test_files/1x1.bmp', '1x1.bmp'),
('/tests/forms_tests/tests/filepath_test_files/1x1.png', '1x1.png'),
('/tests/forms_tests/tests/filepath_test_files/directory', 'directory'),
('/tests/forms_tests/tests/filepath_test_files/fake-image.jpg', 'fake-image.jpg'),
('/tests/forms_tests/tests/filepath_test_files/real-text-file.txt', 'real-text-file.txt'),
('/forms_tests/tests/filepath_test_files/.dot-file', '.dot-file'),
('/forms_tests/tests/filepath_test_files/1x1.bmp', '1x1.bmp'),
('/forms_tests/tests/filepath_test_files/1x1.png', '1x1.png'),
('/forms_tests/tests/filepath_test_files/directory', 'directory'),
('/forms_tests/tests/filepath_test_files/fake-image.jpg', 'fake-image.jpg'),
('/forms_tests/tests/filepath_test_files/real-text-file.txt', 'real-text-file.txt'),
]
actual = fix_os_paths(f.choices)