diff options
author | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
---|---|---|
committer | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
commit | dd49269c7db008b2567f50cb03c4d3d9b321daa1 (patch) | |
tree | 326dd25bb045ac016cda7966b43cbdfe1f67d699 /tests/regressiontests/forms/fields.py | |
parent | c9b188c4ec939abbe48dae5a371276742e64b6b8 (diff) | |
download | django-soc2010/app-loading.tar.gz |
[soc2010/app-loading] merged trunkarchive/soc2010/app-loadingsoc2010/app-loading
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/fields.py')
-rw-r--r-- | tests/regressiontests/forms/fields.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py index 990a9f74cf..e4f2c261c9 100644 --- a/tests/regressiontests/forms/fields.py +++ b/tests/regressiontests/forms/fields.py @@ -766,13 +766,13 @@ class FieldsTests(TestCase): # FilePathField ############################################################### def test_filepathfield_65(self): - path = forms.__file__ + path = os.path.abspath(forms.__file__) path = os.path.dirname(path) + '/' - assert fix_os_paths(path).endswith('/django/forms/') + self.assertTrue(fix_os_paths(path).endswith('/django/forms/')) def test_filepathfield_66(self): path = forms.__file__ - path = os.path.dirname(path) + '/' + path = os.path.dirname(os.path.abspath(path)) + '/' f = FilePathField(path=path) f.choices = [p for p in f.choices if p[0].endswith('.py')] f.choices.sort() @@ -787,13 +787,13 @@ class FieldsTests(TestCase): ] for exp, got in zip(expected, fix_os_paths(f.choices)): self.assertEqual(exp[1], got[1]) - assert got[0].endswith(exp[0]) + self.assertTrue(got[0].endswith(exp[0])) self.assertRaisesErrorWithMessage(ValidationError, "[u'Select a valid choice. fields.py is not one of the available choices.']", f.clean, 'fields.py') assert fix_os_paths(f.clean(path + 'fields.py')).endswith('/django/forms/fields.py') def test_filepathfield_67(self): path = forms.__file__ - path = os.path.dirname(path) + '/' + path = os.path.dirname(os.path.abspath(path)) + '/' f = FilePathField(path=path, match='^.*?\.py$') f.choices.sort() expected = [ @@ -807,10 +807,10 @@ class FieldsTests(TestCase): ] for exp, got in zip(expected, fix_os_paths(f.choices)): self.assertEqual(exp[1], got[1]) - assert got[0].endswith(exp[0]) + self.assertTrue(got[0].endswith(exp[0])) def test_filepathfield_68(self): - path = forms.__file__ + path = os.path.abspath(forms.__file__) path = os.path.dirname(path) + '/' f = FilePathField(path=path, recursive=True, match='^.*?\.py$') f.choices.sort() @@ -827,7 +827,7 @@ class FieldsTests(TestCase): ] for exp, got in zip(expected, fix_os_paths(f.choices)): self.assertEqual(exp[1], got[1]) - assert got[0].endswith(exp[0]) + self.assertTrue(got[0].endswith(exp[0])) # SplitDateTimeField ########################################################## |