cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [4/6] git commit: updated refs/heads/master to 18fbbcf
Date Mon, 22 Jul 2013 17:22:57 GMT
Minor fixes to the test_accounts

when an account is deleted listAccounts raises an exception.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit aa9bc4413efad4eccdf8e336f66ea8c8168fbbda)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5fa77f30
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5fa77f30
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5fa77f30

Branch: refs/heads/master
Commit: 5fa77f3099e0e1c422df94368ac81ee75f95395f
Parents: e245718
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Mon Jul 22 14:48:56 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Mon Jul 22 19:36:27 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_accounts.py | 26 +++++++++---------------
 1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5fa77f30/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index 7d0aeb1..b586176 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -24,8 +24,7 @@ from marvin.integration.lib.base import *
 from marvin.integration.lib.common import *
 from marvin import remoteSSHClient
 from nose.plugins.attrib import attr
-import datetime
-
+from marvin.cloudstackException import cloudstackAPIException
 
 class Services:
     """Test Account Services
@@ -831,12 +830,12 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
         return
 
 
-class TesttemplateHierarchy(cloudstackTestCase):
+class TestTemplateHierarchy(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
         cls.api_client = super(
-                               TesttemplateHierarchy,
+                               TestTemplateHierarchy,
                                cls).getClsTestClient().getApiClient()
         cls.services = Services().services
         # Get Zone settings
@@ -1788,18 +1787,13 @@ class TestDomainForceRemove(cloudstackTestCase):
         # Sleep to ensure that all resources are deleted
         time.sleep(int(configurations[0].value) * 2)
         self.debug("Checking if the resources in domain are deleted or not..")
-        accounts = Account.list(
-                                self.apiclient,
-                                name=self.account_1.name,
-                                domainid=self.account_1.domainid,
-                                listall=True
-                                )
-
-        self.assertEqual(
-            accounts,
-            None,
-            "Account should get automatically deleted after domain removal"
-            )
+        with self.assertRaises(cloudstackAPIException):
+            Account.list(
+                        self.apiclient,
+                        name=self.account_1.name,
+                        domainid=self.account_1.domainid,
+                        listall=True
+                        )
         return
 
     @attr(tags=["domains", "advanced", "advancedns", "simulator"])


Mime
View raw message