diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-03-03 15:04:39 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-03-03 15:04:39 +0000 |
| commit | afd040d4d3a06fe92e3080870b2ff2095ce86a75 (patch) | |
| tree | bda969614999a3fcfbf1466caa0d75e512dd1374 /tests/regressiontests/staticfiles_tests/tests.py | |
| parent | b7c41c1fbb2d45634dde5f7a450ba1a5aea5a8af (diff) | |
Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
assertEquals -> assertEqual
failUnless -> assertTrue
For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/staticfiles_tests/tests.py')
| -rw-r--r-- | tests/regressiontests/staticfiles_tests/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py index 9a2ca6a3ec..4cadd69b6b 100644 --- a/tests/regressiontests/staticfiles_tests/tests.py +++ b/tests/regressiontests/staticfiles_tests/tests.py @@ -194,7 +194,7 @@ class TestFindStatic(BuildStaticTestCase, TestDefaults): lines = [l.strip() for l in sys.stdout.readlines()] finally: sys.stdout = _stdout - self.assertEquals(len(lines), 3) # three because there is also the "Found <file> here" line + self.assertEqual(len(lines), 3) # three because there is also the "Found <file> here" line self.assertTrue('project' in lines[1]) self.assertTrue('apps' in lines[2]) @@ -244,7 +244,7 @@ class TestNoFilesCreated(object): """ Make sure no files were create in the destination directory. """ - self.assertEquals(os.listdir(settings.STATIC_ROOT), []) + self.assertEqual(os.listdir(settings.STATIC_ROOT), []) class TestBuildStaticDryRun(BuildStaticTestCase, TestNoFilesCreated): @@ -302,7 +302,7 @@ class TestServeStatic(StaticFilesTestCase): self.assertContains(self._response(filepath), text) def assertFileNotFound(self, filepath): - self.assertEquals(self._response(filepath).status_code, 404) + self.assertEqual(self._response(filepath).status_code, 404) class TestServeDisabled(TestServeStatic): @@ -349,11 +349,11 @@ class FinderTestCase(object): """ def test_find_first(self): src, dst = self.find_first - self.assertEquals(self.finder.find(src), dst) + self.assertEqual(self.finder.find(src), dst) def test_find_all(self): src, dst = self.find_all - self.assertEquals(self.finder.find(src, all=True), dst) + self.assertEqual(self.finder.find(src, all=True), dst) class TestFileSystemFinder(StaticFilesTestCase, FinderTestCase): |
