Remove the django_db mark from TransactionTestCase classes

pytest-django's documentation indicates that it isn't necessary, and
it turns out in Django 2.0+ that this double application of the
transaction machinations was causing the Django ContentType table to
lose its items.
This commit is contained in:
Jeff Bradberry 2019-06-26 13:34:54 -04:00
parent c85d58e28d
commit 47b325896d
3 changed files with 0 additions and 3 deletions

View File

@ -20,7 +20,6 @@ from django.test import TransactionTestCase
from django.core.exceptions import ValidationError
@pytest.mark.django_db
class TestWorkflowDAGFunctional(TransactionTestCase):
def workflow_job(self, states=['new', 'new', 'new', 'new', 'new']):
"""

View File

@ -8,7 +8,6 @@ from awx.main.models import (
)
@pytest.mark.django_db
class TestCapacityMapping(TransactionTestCase):
def sample_cluster(self):

View File

@ -7,7 +7,6 @@ from awx.main.access import UserAccess, RoleAccess, TeamAccess
from awx.main.models import User, Organization, Inventory
@pytest.mark.django_db
class TestSysAuditorTransactional(TransactionTestCase):
def rando(self):
return User.objects.create(username='rando', password='rando', email='rando@com.com')