summaryrefslogtreecommitdiff
path: root/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
commit01652ef4ec4d7a92bfdcf677c27fb28968398bc6 (patch)
tree495a8d994def30a30512beaf4077643c41cff332 /python/tests/codec.py
parent6577b14632d81c15482cb0793e01166cdb28eaff (diff)
downloadqpid-python-01652ef4ec4d7a92bfdcf677c27fb28968398bc6.tar.gz
added support for unpacked structs and execution.result
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564637 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests/codec.py')
-rw-r--r--python/tests/codec.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/tests/codec.py b/python/tests/codec.py
index 785f1aba6b..689a2cf4c1 100644
--- a/python/tests/codec.py
+++ b/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()