From c569a9c5af8adb183dc130c4b1de207953da9fe5 Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Sat, 15 Apr 2017 20:02:04 +0800 Subject: [PATCH] fix build failure do not check by string, the key order is not consistent between python versions. --- pyswagger/tests/v2_0/test_io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyswagger/tests/v2_0/test_io.py b/pyswagger/tests/v2_0/test_io.py index c7fa23b..e39a595 100644 --- a/pyswagger/tests/v2_0/test_io.py +++ b/pyswagger/tests/v2_0/test_io.py @@ -5,6 +5,7 @@ import unittest import os import six +import json class RequestTestCase(unittest.TestCase): @@ -64,7 +65,7 @@ def test_missing_reference_parameter(self): """ req, _ = self.app.op['missing.parameter'](body=dict(f1='say', f2='hello')) req.prepare() - self.assertEqual(req.data, '{"f1": "say", "f2": "hello"}') + self.assertEqual(json.loads(req.data), {'f1': "say", 'f2': "hello"}) class ResponseTestCase(unittest.TestCase):