|
4 | 4 |
|
5 | 5 | from xml.etree import ElementTree as ET
|
6 | 6 |
|
7 |
| -from django.contrib.auth.models import User |
8 |
| -from django.db import IntegrityError, transaction |
9 | 7 | from django.test import TestCase, RequestFactory
|
10 | 8 | from django.test.utils import override_settings
|
11 | 9 | from django.utils import six
|
@@ -158,21 +156,3 @@ def test_object_with_non_ascii_repr_in_request_vars(self):
|
158 | 156 | def test_xml_validation(self):
|
159 | 157 | response = self.client.get('/regular/XML/')
|
160 | 158 | ET.fromstring(response.content) # shouldn't raise ParseError
|
161 |
| - |
162 |
| - def test_view_executed_once(self): |
163 |
| - with self.settings( |
164 |
| - DEBUG_TOOLBAR_PANELS=['debug_toolbar.panels.profiling.ProfilingDebugPanel']): |
165 |
| - |
166 |
| - self.assertEqual(User.objects.count(), 0) |
167 |
| - |
168 |
| - response = self.client.get('/new_user/') |
169 |
| - self.assertContains(response, 'Profiling') |
170 |
| - self.assertEqual(User.objects.count(), 1) |
171 |
| - |
172 |
| - with self.assertRaises(IntegrityError): |
173 |
| - if hasattr(transaction, 'atomic'): # Django >= 1.6 |
174 |
| - with transaction.atomic(): |
175 |
| - response = self.client.get('/new_user/') |
176 |
| - else: |
177 |
| - response = self.client.get('/new_user/') |
178 |
| - self.assertEqual(User.objects.count(), 1) |
0 commit comments