1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

More unit test fixups for system uuid

This commit is contained in:
Matthew Jones 2014-11-17 14:50:57 -05:00
parent eae8c48faa
commit c48dde9753
4 changed files with 6 additions and 11 deletions

View File

@ -104,7 +104,6 @@ class BaseCommandMixin(object):
'''
def create_test_inventories(self):
self.setup_instances()
self.setup_users()
self.organizations = self.make_organizations(self.super_django_user, 2)
self.projects = self.make_projects(self.normal_django_user, 2)
@ -297,6 +296,7 @@ class CleanupJobsTest(BaseCommandMixin, BaseLiveServerTest):
def setUp(self):
super(CleanupJobsTest, self).setUp()
self.test_project_path = None
self.setup_instances()
self.setup_users()
self.organization = self.make_organizations(self.super_django_user, 1)[0]
self.inventory = Inventory.objects.create(name='test-inventory',

View File

@ -1083,6 +1083,7 @@ class InventoryUpdatesTest(BaseTransactionTest):
def setUp(self):
super(InventoryUpdatesTest, self).setUp()
self.setup_instances()
self.setup_users()
self.organization = self.make_organizations(self.super_django_user, 1)[0]
self.organization.admins.add(self.normal_django_user)

View File

@ -196,16 +196,7 @@ TEST_SURVEY_REQUIREMENTS = '''
'''
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,
groups_hosts_dict):
@ -698,11 +689,14 @@ class BaseJobTestMixin(BaseTestMixin):
def setUp(self):
super(BaseJobTestMixin, self).setUp()
self.start_redis()
self.setup_instances()
self.populate()
self.start_queue()
def tearDown(self):
super(BaseJobTestMixin, self).tearDown()
self.stop_redis()
self.terminate_queue()
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):

View File

@ -42,8 +42,8 @@ class ProjectsTest(BaseTransactionTest):
return reverse('api:project_list')
def setUp(self):
self.setup_instances()
super(ProjectsTest, self).setUp()
self.setup_instances()
self.setup_users()
self.organizations = self.make_organizations(self.super_django_user, 10)