summaryrefslogtreecommitdiff
path: root/qpid/python/tests/codec.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-08-10 15:55:16 +0000
committerRafael H. Schloming <rhs@apache.org>2007-08-10 15:55:16 +0000
commitd1753304ae2248afbe7fad712a76ae87b4c0140a (patch)
treec18f882d1d62a10919d16e77bb7b517e1b0c9562 /qpid/python/tests/codec.py
parent0ced84fe4947e2d2e37c0422aec7f6a2ac4ebd69 (diff)
downloadqpid-python-d1753304ae2248afbe7fad712a76ae87b4c0140a.tar.gz
added support for unpacked structs and execution.result
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@564637 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests/codec.py')
-rw-r--r--qpid/python/tests/codec.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/python/tests/codec.py b/qpid/python/tests/codec.py
index 785f1aba6b..689a2cf4c1 100644
--- a/qpid/python/tests/codec.py
+++ b/qpid/python/tests/codec.py
@@ -20,6 +20,7 @@
import unittest
from qpid.codec import Codec
+from qpid.spec import load
from cStringIO import StringIO
from qpid.reference import ReferenceId
@@ -52,11 +53,13 @@ __doc__ = """
"""
+SPEC = load("../specs/amqp.0-10-preview.xml")
# --------------------------------------
# --------------------------------------
class BaseDataTypes(unittest.TestCase):
+
"""
Base class containing common functions
"""
@@ -66,7 +69,7 @@ class BaseDataTypes(unittest.TestCase):
"""
standard setUp for unitetest (refer unittest documentation for details)
"""
- self.codec = Codec(StringIO())
+ self.codec = Codec(StringIO(), SPEC)
# ------------------
def tearDown(self):
@@ -504,7 +507,7 @@ def test(type, value):
else:
values = [value]
stream = StringIO()
- codec = Codec(stream)
+ codec = Codec(stream, SPEC)
for v in values:
codec.encode(type, v)
codec.flush()