mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
More unit test fixups for system uuid
This commit is contained in:
@@ -104,7 +104,6 @@ class BaseCommandMixin(object):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
def create_test_inventories(self):
|
def create_test_inventories(self):
|
||||||
self.setup_instances()
|
|
||||||
self.setup_users()
|
self.setup_users()
|
||||||
self.organizations = self.make_organizations(self.super_django_user, 2)
|
self.organizations = self.make_organizations(self.super_django_user, 2)
|
||||||
self.projects = self.make_projects(self.normal_django_user, 2)
|
self.projects = self.make_projects(self.normal_django_user, 2)
|
||||||
@@ -297,6 +296,7 @@ class CleanupJobsTest(BaseCommandMixin, BaseLiveServerTest):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(CleanupJobsTest, self).setUp()
|
super(CleanupJobsTest, self).setUp()
|
||||||
self.test_project_path = None
|
self.test_project_path = None
|
||||||
|
self.setup_instances()
|
||||||
self.setup_users()
|
self.setup_users()
|
||||||
self.organization = self.make_organizations(self.super_django_user, 1)[0]
|
self.organization = self.make_organizations(self.super_django_user, 1)[0]
|
||||||
self.inventory = Inventory.objects.create(name='test-inventory',
|
self.inventory = Inventory.objects.create(name='test-inventory',
|
||||||
|
|||||||
@@ -1083,6 +1083,7 @@ class InventoryUpdatesTest(BaseTransactionTest):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(InventoryUpdatesTest, self).setUp()
|
super(InventoryUpdatesTest, self).setUp()
|
||||||
|
self.setup_instances()
|
||||||
self.setup_users()
|
self.setup_users()
|
||||||
self.organization = self.make_organizations(self.super_django_user, 1)[0]
|
self.organization = self.make_organizations(self.super_django_user, 1)[0]
|
||||||
self.organization.admins.add(self.normal_django_user)
|
self.organization.admins.add(self.normal_django_user)
|
||||||
|
|||||||
@@ -196,16 +196,7 @@ TEST_SURVEY_REQUIREMENTS = '''
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
class BaseJobTestMixin(BaseTestMixin):
|
class BaseJobTestMixin(BaseTestMixin):
|
||||||
''''''
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
self.start_redis()
|
|
||||||
self.setup_instances()
|
|
||||||
super(BaseJobTestMixin, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
self.stop_redis()
|
|
||||||
super(BaseJobTestMixin, self).tearDown()
|
|
||||||
|
|
||||||
def _create_inventory(self, name, organization, created_by,
|
def _create_inventory(self, name, organization, created_by,
|
||||||
groups_hosts_dict):
|
groups_hosts_dict):
|
||||||
@@ -698,11 +689,14 @@ class BaseJobTestMixin(BaseTestMixin):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BaseJobTestMixin, self).setUp()
|
super(BaseJobTestMixin, self).setUp()
|
||||||
|
self.start_redis()
|
||||||
|
self.setup_instances()
|
||||||
self.populate()
|
self.populate()
|
||||||
self.start_queue()
|
self.start_queue()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(BaseJobTestMixin, self).tearDown()
|
super(BaseJobTestMixin, self).tearDown()
|
||||||
|
self.stop_redis()
|
||||||
self.terminate_queue()
|
self.terminate_queue()
|
||||||
|
|
||||||
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ class ProjectsTest(BaseTransactionTest):
|
|||||||
return reverse('api:project_list')
|
return reverse('api:project_list')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.setup_instances()
|
|
||||||
super(ProjectsTest, self).setUp()
|
super(ProjectsTest, self).setUp()
|
||||||
|
self.setup_instances()
|
||||||
self.setup_users()
|
self.setup_users()
|
||||||
|
|
||||||
self.organizations = self.make_organizations(self.super_django_user, 10)
|
self.organizations = self.make_organizations(self.super_django_user, 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user