From cb2b4af29370fd3cd3494cd58fc0d532c568dc21 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 21 Nov 2008 13:53:53 +0000 Subject: code cleanup on qmf console API Formalized schema-class as an object with an all-string __repr__ Added additional testing for the console API git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@719580 13f79535-47bb-0310-9956-ffa450edef68 --- python/tests_0-10/management.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'python/tests_0-10') diff --git a/python/tests_0-10/management.py b/python/tests_0-10/management.py index a47982173b..0632d85da4 100644 --- a/python/tests_0-10/management.py +++ b/python/tests_0-10/management.py @@ -71,10 +71,27 @@ class ManagementTest (TestBase010): self.assertEqual (res.sequence, seq) self.assertEqual (res.body, body) - def test_system_object (self): + def test_get_objects(self): self.startQmf() - systems = self.qmf.getObjects(_class="system") - self.assertEqual (len (systems), 1) + + # get the package list, verify that the qpid broker package is there + packages = self.qmf.getPackages() + assert 'org.apache.qpid.broker' in packages + + # get the schema class keys for the broker, verify the broker table and link-down event + keys = self.qmf.getClasses('org.apache.qpid.broker') + broker = None + linkDown = None + for key in keys: + if key.getClassName() == "broker": broker = key + if key.getClassName() == "brokerLinkDown" : linkDown = key + assert broker + assert linkDown + + brokerObjs = self.qmf.getObjects(_class="broker") + assert len(brokerObjs) == 1 + brokerObjs = self.qmf.getObjects(_key=broker) + assert len(brokerObjs) == 1 def test_self_session_id (self): self.startQmf() -- cgit v1.2.1