diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py
index 990a9f7..e4f2c26 100644
a
|
b
|
class FieldsTests(TestCase):
|
766 | 766 | # FilePathField ############################################################### |
767 | 767 | |
768 | 768 | def test_filepathfield_65(self): |
769 | | path = forms.__file__ |
| 769 | path = os.path.abspath(forms.__file__) |
770 | 770 | path = os.path.dirname(path) + '/' |
771 | | assert fix_os_paths(path).endswith('/django/forms/') |
| 771 | self.assertTrue(fix_os_paths(path).endswith('/django/forms/')) |
772 | 772 | |
773 | 773 | def test_filepathfield_66(self): |
774 | 774 | path = forms.__file__ |
775 | | path = os.path.dirname(path) + '/' |
| 775 | path = os.path.dirname(os.path.abspath(path)) + '/' |
776 | 776 | f = FilePathField(path=path) |
777 | 777 | f.choices = [p for p in f.choices if p[0].endswith('.py')] |
778 | 778 | f.choices.sort() |
… |
… |
class FieldsTests(TestCase):
|
787 | 787 | ] |
788 | 788 | for exp, got in zip(expected, fix_os_paths(f.choices)): |
789 | 789 | self.assertEqual(exp[1], got[1]) |
790 | | assert got[0].endswith(exp[0]) |
| 790 | self.assertTrue(got[0].endswith(exp[0])) |
791 | 791 | self.assertRaisesErrorWithMessage(ValidationError, "[u'Select a valid choice. fields.py is not one of the available choices.']", f.clean, 'fields.py') |
792 | 792 | assert fix_os_paths(f.clean(path + 'fields.py')).endswith('/django/forms/fields.py') |
793 | 793 | |
794 | 794 | def test_filepathfield_67(self): |
795 | 795 | path = forms.__file__ |
796 | | path = os.path.dirname(path) + '/' |
| 796 | path = os.path.dirname(os.path.abspath(path)) + '/' |
797 | 797 | f = FilePathField(path=path, match='^.*?\.py$') |
798 | 798 | f.choices.sort() |
799 | 799 | expected = [ |
… |
… |
class FieldsTests(TestCase):
|
807 | 807 | ] |
808 | 808 | for exp, got in zip(expected, fix_os_paths(f.choices)): |
809 | 809 | self.assertEqual(exp[1], got[1]) |
810 | | assert got[0].endswith(exp[0]) |
| 810 | self.assertTrue(got[0].endswith(exp[0])) |
811 | 811 | |
812 | 812 | def test_filepathfield_68(self): |
813 | | path = forms.__file__ |
| 813 | path = os.path.abspath(forms.__file__) |
814 | 814 | path = os.path.dirname(path) + '/' |
815 | 815 | f = FilePathField(path=path, recursive=True, match='^.*?\.py$') |
816 | 816 | f.choices.sort() |
… |
… |
class FieldsTests(TestCase):
|
827 | 827 | ] |
828 | 828 | for exp, got in zip(expected, fix_os_paths(f.choices)): |
829 | 829 | self.assertEqual(exp[1], got[1]) |
830 | | assert got[0].endswith(exp[0]) |
| 830 | self.assertTrue(got[0].endswith(exp[0])) |
831 | 831 | |
832 | 832 | # SplitDateTimeField ########################################################## |
833 | 833 | |