diff options
| author | Ted Ross <tross@apache.org> | 2008-11-21 13:53:53 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2008-11-21 13:53:53 +0000 |
| commit | cb2b4af29370fd3cd3494cd58fc0d532c568dc21 (patch) | |
| tree | d4414a96651fdebae2495112ba02d7014d9e50f3 /python/tests_0-10 | |
| parent | c653274f9dee056e20e32ee7d75150f55315af56 (diff) | |
| download | qpid-python-cb2b4af29370fd3cd3494cd58fc0d532c568dc21.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/qpid@719580 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests_0-10')
| -rw-r--r-- | python/tests_0-10/management.py | 23 |
1 files changed, 20 insertions, 3 deletions
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() |
