summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings/qmf/tests/python_agent.py
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2010-04-27 15:19:14 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2010-04-27 15:19:14 +0000
commit07c5b6e839e23e72d6d107cc7ed979db412aa53d (patch)
tree3a6d503833a1217487f6e0c6ef9f59c08ae48e32 /qpid/cpp/bindings/qmf/tests/python_agent.py
parentf434d868a3a58f7fb469e6d2d4f69aa01b1130d7 (diff)
downloadqpid-python-07c5b6e839e23e72d6d107cc7ed979db412aa53d.tar.gz
QPID-2556: fix conversion of signed integers in maps and lists.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@938506 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/qmf/tests/python_agent.py')
-rw-r--r--qpid/cpp/bindings/qmf/tests/python_agent.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/qpid/cpp/bindings/qmf/tests/python_agent.py b/qpid/cpp/bindings/qmf/tests/python_agent.py
index 4974e0ec90..1003ce875a 100644
--- a/qpid/cpp/bindings/qmf/tests/python_agent.py
+++ b/qpid/cpp/bindings/qmf/tests/python_agent.py
@@ -146,17 +146,6 @@ class App(qmf.AgentHandler):
self._parent["int16val"] = 10000
self._parent.set_attr("int8val", 100)
- self._parent.set_attr("mapval", {'u64' : self._parent['uint64val'],
- 'u32' : self._parent['uint32val'],
- 'u16' : self._parent['uint16val'],
- 'u8' : self._parent['uint8val'],
- 'i64' : self._parent['int64val'],
- 'i32' : self._parent['int32val'],
- 'i16' : self._parent['int16val'],
- 'i8' : self._parent['int8val'],
- 'sstr' : "Short String",
- 'map' : {'first' : 'FIRST', 'second' : 'SECOND'}})
-
event = qmf.QmfEvent(self._model.event_class)
event.uint32val = self._parent.get_attr("uint32val")
event.strval = "Unused"
@@ -292,9 +281,20 @@ class App(qmf.AgentHandler):
self._parent.set_attr("int8val", 0)
# a list containing a list that contains a map (so there!)
- self._parent.set_attr("listval", ['a', 1, 'b', 2,
+ self._parent.set_attr("listval", ['a', 1, 'b', -2,
['c', True, 3.1415,
- {"hi": 10, "lo": 5}]])
+ {"hi": 10, "lo": 5, "neg": -3}]])
+ # a default map
+ self._parent.set_attr("mapval", {'aLong' : long(9999999999),
+ 'aInt' : int(54321),
+ 'aSigned' : -666,
+ 'aString' : "A String",
+ 'aFloat' : 3.1415,
+ 'aMap' : {'first' : 1,
+ 'second': 2},
+ 'aList' : ['x', -1, 'y', 2]})
+
+
self._parent_oid = self._agent.alloc_object_id(1)
self._parent.set_object_id(self._parent_oid)