diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-04-14 16:33:40 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-04-14 16:33:40 +0000 |
| commit | e9172bcdf62db1ed07d64ab10d8850cbaad9046b (patch) | |
| tree | 9dc63ef0bac2b1b9b255b6a39901778f59989ad3 /qpid/python/tests | |
| parent | 98e818c6ca30443b6196be70b31e7d17a22797c7 (diff) | |
| download | qpid-python-e9172bcdf62db1ed07d64ab10d8850cbaad9046b.tar.gz | |
fixed encode/decode of structs in command/control arguments to include the type code when specified
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@647887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests')
| -rw-r--r-- | qpid/python/tests/spec010.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qpid/python/tests/spec010.py b/qpid/python/tests/spec010.py index 4161dc060f..ff29bd8cea 100644 --- a/qpid/python/tests/spec010.py +++ b/qpid/python/tests/spec010.py @@ -26,7 +26,7 @@ from qpid.datatypes import Struct class SpecTest(TestCase): def setUp(self): - self.spec = load(testrunner.get_spec_file("amqp.0-10.xml")) + self.spec = load(testrunner.get_spec_file("amqp.0-10-qpid-errata.xml")) def testSessionHeader(self): hdr = self.spec["session.header"] @@ -62,3 +62,11 @@ class SpecTest(TestCase): dec = self.encdec(self.spec["message.subscribe"], cmd) assert cmd.exclusive == dec.exclusive assert cmd.destination == dec.destination + + def testXid(self): + xid = self.spec["dtx.xid"] + sc = StringCodec(self.spec) + st = Struct(xid, format=0, global_id="gid", branch_id="bid") + xid.encode(sc, st) + assert sc.encoded == '\x00\x00\x00\x10\x06\x04\x07\x00\x00\x00\x00\x00\x03gid\x03bid' + assert xid.decode(sc).__dict__ == st.__dict__ |
