summaryrefslogtreecommitdiff
path: root/python/tests/codec.py
diff options
context:
space:
mode:
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()