1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Replaced vendor checks by three feature flags.

This commit is contained in:
Aymeric Augustin
2014-05-07 21:50:09 +02:00
parent 43a80f4812
commit c70a61eb49
7 changed files with 17 additions and 16 deletions

View File

@@ -3937,8 +3937,7 @@ class UserAdminTest(TestCase):
ContentType.objects.clear_cache()
expected_queries = 10
# Oracle doesn't implement "RELEASE SAVPOINT", see #20387.
if connection.vendor == 'oracle':
if not connection.features.can_release_savepoints:
expected_queries -= 1
with self.assertNumQueries(expected_queries):
@@ -3980,8 +3979,7 @@ class GroupAdminTest(TestCase):
g = Group.objects.create(name="test_group")
expected_queries = 8
# Oracle doesn't implement "RELEASE SAVPOINT", see #20387.
if connection.vendor == 'oracle':
if not connection.features.can_release_savepoints:
expected_queries -= 1
with self.assertNumQueries(expected_queries):