summaryrefslogtreecommitdiff
path: root/pecan/tests/test_jsonify.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/tests/test_jsonify.py')
-rw-r--r--pecan/tests/test_jsonify.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pecan/tests/test_jsonify.py b/pecan/tests/test_jsonify.py
index 3c5d8b5..1c1c589 100644
--- a/pecan/tests/test_jsonify.py
+++ b/pecan/tests/test_jsonify.py
@@ -9,14 +9,14 @@ try:
from sqlalchemy.engine import create_engine
except ImportError:
create_engine = None # noqa
-from unittest import TestCase
-from pecan.jsonify import jsonify, encode, ResultProxy, RowProxy
-from pecan import Pecan, expose
from webtest import TestApp
-
from webob.multidict import MultiDict
+from pecan.jsonify import jsonify, encode, ResultProxy, RowProxy
+from pecan import Pecan, expose
+from pecan.tests import PecanTestCase
+
def make_person():
class Person(object):
@@ -49,7 +49,7 @@ def test_simple_rule():
assert len(result) == 1
-class TestJsonify(TestCase):
+class TestJsonify(PecanTestCase):
def test_simple_jsonify(self):
Person = make_person()
@@ -75,7 +75,7 @@ class TestJsonify(TestCase):
assert loads(r.body) == {'name': 'Jonathan LaCour'}
-class TestJsonifyGenericEncoder(TestCase):
+class TestJsonifyGenericEncoder(PecanTestCase):
def test_json_callable(self):
class JsonCallable(object):
def __init__(self, arg):
@@ -118,9 +118,10 @@ class TestJsonifyGenericEncoder(TestCase):
self.assertRaises(TypeError, encode, Foo())
-class TestJsonifySQLAlchemyGenericEncoder(TestCase):
+class TestJsonifySQLAlchemyGenericEncoder(PecanTestCase):
def setUp(self):
+ super(TestJsonifySQLAlchemyGenericEncoder, self).setUp()
if not create_engine:
self.create_fake_proxies()
else: