summaryrefslogtreecommitdiff
path: root/qpid/python/tests_0-10
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-11-21 13:53:53 +0000
committerTed Ross <tross@apache.org>2008-11-21 13:53:53 +0000
commited6ad2636dfa46133f7202dea30313ba96b6fcb8 (patch)
tree70f52354cbcb79224420a8a72870232989211947 /qpid/python/tests_0-10
parentc7e74dd9091e4c06aaee83bda9d6915f3d080455 (diff)
downloadqpid-python-ed6ad2636dfa46133f7202dea30313ba96b6fcb8.tar.gz
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@719580 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests_0-10')
-rw-r--r--qpid/python/tests_0-10/management.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/qpid/python/tests_0-10/management.py b/qpid/python/tests_0-10/management.py
index a47982173b..0632d85da4 100644
--- a/qpid/python/tests_0-10/management.py
+++ b/qpid/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()