AC-537 Work on getting unit tests to pass.

This commit is contained in:
Chris Church
2013-10-29 16:14:51 -04:00
parent d668991899
commit 9b204e737e
3 changed files with 31 additions and 25 deletions

View File

@@ -1032,9 +1032,12 @@ class InventoryUpdatesTest(BaseTransactionTest):
source_regions = getattr(settings, 'TEST_AWS_REGIONS', 'all')
if not all([source_username, source_password]):
self.skipTest('no test ec2 credentials defined!')
credential = Credential.objects.create(kind='aws',
user=self.super_django_user,
username=source_username,
password=source_password)
inventory_source = self.update_inventory_source(self.group,
source='ec2', source_username=source_username,
source_password=source_password, source_regions=source_regions,
source='ec2', credential=credential, source_regions=source_regions,
source_vars='---')
self.check_inventory_source(inventory_source)
@@ -1044,7 +1047,11 @@ class InventoryUpdatesTest(BaseTransactionTest):
source_regions = getattr(settings, 'TEST_RACKSPACE_REGIONS', '')
if not all([source_username, source_password]):
self.skipTest('no test rackspace credentials defined!')
credential = Credential.objects.create(kind='rax',
user=self.super_django_user,
username=source_username,
password=source_password)
inventory_source = self.update_inventory_source(self.group,
source='rackspace', source_username=source_username,
source_password=source_password, source_regions=source_regions)
source='rackspace', credential=credential,
source_regions=source_regions)
self.check_inventory_source(inventory_source)