diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index e0000ff..39c0eb1 100644
a
|
b
|
from django.contrib.auth import REDIRECT_FIELD_NAME
|
26 | 26 | from django.contrib.auth.models import Group, User, Permission, UNUSABLE_PASSWORD |
27 | 27 | from django.contrib.contenttypes.models import ContentType |
28 | 28 | from django.core.urlresolvers import reverse |
| 29 | from django.db import connection |
29 | 30 | from django.forms.util import ErrorList |
30 | 31 | from django.template.response import TemplateResponse |
31 | 32 | from django.test import TestCase |
… |
… |
class UserAdminTest(TestCase):
|
3605 | 3606 | |
3606 | 3607 | # Don't depend on a warm cache, see #17377. |
3607 | 3608 | ContentType.objects.clear_cache() |
3608 | | with self.assertNumQueries(10): |
| 3609 | |
| 3610 | expected_queries = 10 |
| 3611 | # Oracle doesn't implement "RELEASE SAVPOINT", see #20387. |
| 3612 | if connection.vendor == 'oracle': |
| 3613 | expected_queries -= 1 |
| 3614 | |
| 3615 | with self.assertNumQueries(9): |
3609 | 3616 | response = self.client.get('/test_admin/admin/auth/user/%s/' % u.pk) |
3610 | 3617 | self.assertEqual(response.status_code, 200) |
3611 | 3618 | |
… |
… |
class GroupAdminTest(TestCase):
|
3643 | 3650 | def test_group_permission_performance(self): |
3644 | 3651 | g = Group.objects.create(name="test_group") |
3645 | 3652 | |
3646 | | with self.assertNumQueries(8): # instead of 259! |
| 3653 | expected_queries = 8 |
| 3654 | # Oracle doesn't implement "RELEASE SAVPOINT", see #20387. |
| 3655 | if connection.vendor == 'oracle': |
| 3656 | expected_queries -= 1 |
| 3657 | |
| 3658 | with self.assertNumQueries(expected_queries): |
3647 | 3659 | response = self.client.get('/test_admin/admin/auth/group/%s/' % g.pk) |
3648 | 3660 | self.assertEqual(response.status_code, 200) |
3649 | 3661 | |