You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/07/07 14:10:48 UTC
git commit: AMBARI-6392. Python Stacks tests should fail if trying to
assert when no resources called (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk ce268b2af -> 81ccf73a9
AMBARI-6392. Python Stacks tests should fail if trying to assert when no resources called (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81ccf73a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81ccf73a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81ccf73a
Branch: refs/heads/trunk
Commit: 81ccf73a9fad21f06473f5e66c7e07fad9e23050
Parents: ce268b2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Jul 7 15:10:42 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Jul 7 15:10:42 2014 +0300
----------------------------------------------------------------------
ambari-server/src/test/python/stacks/utils/RMFTestCase.py | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/81ccf73a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
index fe4e594..3a85f73 100644
--- a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
+++ b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
@@ -161,7 +161,9 @@ class RMFTestCase(TestCase):
def assertResourceCalled(self, resource_type, name, **kwargs):
with patch.object(UnknownConfiguration, '__getattr__', return_value=lambda: "UnknownConfiguration()"):
+ self.assertNotEqual(len(RMFTestCase.env.resource_list), 0, "There was no more resources executed!")
resource = RMFTestCase.env.resource_list.pop(0)
+
self.assertEquals(resource_type, resource.__class__.__name__)
self.assertEquals(name, resource.name)
self.assertEquals(kwargs, resource.arguments)