From 3ba8dc455f446f695225ee06efa81258067fb236 Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Sun, 9 Dec 2012 22:04:27 -0800 Subject: [PATCH] Smoke Tests: incorrect self reference in setUpClass should be cls.apiClient and not self.apiClient --- test/integration/smoke/test_iso.py | 2 +- tools/marvin/marvin/cloudstackTestClient.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index fc726721c9b..23c5786b37b 100644 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -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): diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 2502656a997..cb63179f40f 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -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