Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refs #15903 -- Added a per-TestCase urlconf to reduce coupling betwee…

…n test apps.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 04654e554ff5fe048275624b75fa5f9279aff175 1 parent c85b765
@carljm carljm authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/regressiontests/views/tests/debug.py
View
6 tests/regressiontests/views/tests/debug.py
@@ -12,6 +12,8 @@
class DebugViewTests(TestCase):
+ urls = "regressiontests.views.urls"
+
def setUp(self):
self.old_debug = settings.DEBUG
settings.DEBUG = True
@@ -23,13 +25,13 @@ def tearDown(self):
settings.TEMPLATE_DEBUG = self.old_template_debug
def test_files(self):
- response = self.client.get('/views/raises/')
+ response = self.client.get('/raises/')
self.assertEqual(response.status_code, 500)
data = {
'file_data.txt': SimpleUploadedFile('file_data.txt', 'haha'),
}
- response = self.client.post('/views/raises/', data)
+ response = self.client.post('/raises/', data)
self.assertTrue('file_data.txt' in response.content)
self.assertFalse('haha' in response.content)
Please sign in to comment.
Something went wrong with that request. Please try again.