Smoke Tests: incorrect self reference in setUpClass

should be cls.apiClient and not self.apiClient
This commit is contained in:
Prasanna Santhanam 2012-12-09 22:04:27 -08:00
parent 8466ff1e1f
commit 3ba8dc455f
2 changed files with 8 additions and 2 deletions

View File

@ -218,7 +218,7 @@ class TestISO(cloudstackTestCase):
cls.services["account"] = cls.account.account.name
# Finding the OsTypeId from Ostype
ostypes = list_os_types(
self.apiclient,
cls.apiclient,
description=self.services["ostype"]
)
if not isinstance(ostypes, list):

View File

@ -137,7 +137,13 @@ class cloudstackTestClient(object):
def getApiClient(self):
return self.apiClient
def getUserApiClient(self):
def getUserApiClient(self, account, domain, type=0):
"""
0 - user
1 - admin
2 - domain admin
"""
self.createUserApiClient(account, domain, type)
if hasattr(self, "userApiClient"):
return self.userApiClient
return None