mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Use TransactionTestCase with Django 1.8+
This commit is contained in:
parent
fb5369404d
commit
fa1137d371
@ -15,7 +15,7 @@ import yaml
|
||||
|
||||
__all__ = ['JobTemplateLaunchTest', 'JobTemplateLaunchPasswordsTest']
|
||||
|
||||
class JobTemplateLaunchTest(BaseJobTestMixin, django.test.TestCase):
|
||||
class JobTemplateLaunchTest(BaseJobTestMixin, django.test.TransactionTestCase):
|
||||
def setUp(self):
|
||||
super(JobTemplateLaunchTest, self).setUp()
|
||||
|
||||
@ -178,7 +178,7 @@ class JobTemplateLaunchTest(BaseJobTestMixin, django.test.TestCase):
|
||||
with self.current_user(self.user_sue):
|
||||
self.post(self.launch_url, {}, expect=400)
|
||||
|
||||
class JobTemplateLaunchPasswordsTest(BaseJobTestMixin, django.test.TestCase):
|
||||
class JobTemplateLaunchPasswordsTest(BaseJobTestMixin, django.test.TransactionTestCase):
|
||||
def setUp(self):
|
||||
super(JobTemplateLaunchPasswordsTest, self).setUp()
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ TEST_SURVEY_REQUIREMENTS = '''
|
||||
}
|
||||
'''
|
||||
|
||||
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
||||
class JobTemplateTest(BaseJobTestMixin, django.test.TransactionTestCase):
|
||||
|
||||
JOB_TEMPLATE_FIELDS = ('id', 'type', 'url', 'related', 'summary_fields',
|
||||
'created', 'modified', 'name', 'description',
|
||||
@ -492,7 +492,7 @@ class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
||||
with self.current_user(self.user_doug):
|
||||
self.get(detail_url, expect=403)
|
||||
|
||||
class JobTest(BaseJobTestMixin, django.test.TestCase):
|
||||
class JobTest(BaseJobTestMixin, django.test.TransactionTestCase):
|
||||
|
||||
def test_get_job_list(self):
|
||||
url = reverse('api:job_list')
|
||||
@ -1068,7 +1068,7 @@ class JobTransactionTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
||||
self.assertEqual(job.status, 'successful', job.result_stdout)
|
||||
self.assertFalse(errors)
|
||||
|
||||
class JobTemplateSurveyTest(BaseJobTestMixin, django.test.TestCase):
|
||||
class JobTemplateSurveyTest(BaseJobTestMixin, django.test.TransactionTestCase):
|
||||
def setUp(self):
|
||||
super(JobTemplateSurveyTest, self).setUp()
|
||||
# TODO: Test non-enterprise license
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user