From 0d603d9887132c3f9b81b5439d57cc58a54d3c60 Mon Sep 17 00:00:00 2001 From: "mission.liao" Date: Wed, 26 Nov 2014 09:14:03 +0800 Subject: [PATCH] byte & str in py3 --- pyswagger/tests/v2_0/test_prim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyswagger/tests/v2_0/test_prim.py b/pyswagger/tests/v2_0/test_prim.py index 0698c15..9481ea9 100644 --- a/pyswagger/tests/v2_0/test_prim.py +++ b/pyswagger/tests/v2_0/test_prim.py @@ -4,6 +4,7 @@ from pyswagger.utils import jp_compose import unittest import datetime +import six class SchemaTestCase(unittest.TestCase): @@ -118,7 +119,7 @@ def test_byte(self): bv = b._prim_("BBBBB") self.assertEqual(str(bv), "BBBBB") - self.assertEqual(bv.to_json(), "QkJCQkI=") + self.assertEqual(bv.to_json(), six.b("QkJCQkI=")) def test_date(self): """ test date """