Removed unnecessary transaction wrapping in expressions test.

This commit is contained in:
Simon Charette 2019-01-15 23:39:23 -06:00 committed by Tim Graham
parent 876dc306cd
commit aa5d0a5a90
1 changed files with 6 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import uuid
from copy import deepcopy
from django.core.exceptions import FieldError
from django.db import DatabaseError, connection, models, transaction
from django.db import DatabaseError, connection, models
from django.db.models import CharField, Q, TimeField, UUIDField
from django.db.models.aggregates import (
Avg, Count, Max, Min, StdDev, Sum, Variance,
@ -237,7 +237,6 @@ class BasicExpressionsTests(TestCase):
"foo",
)
with transaction.atomic():
msg = "Joined field references are not permitted in this query"
with self.assertRaisesMessage(FieldError, msg):
Company.objects.exclude(