From 68622f7843b437b1223e80439fe7bcb0f261853c Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 29 Aug 2017 14:54:51 +0800 Subject: [PATCH] fix travis-ci job 152 --- ate/utils.py | 3 ++- tests/test_client.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ate/utils.py b/ate/utils.py index 00ea94f5..be9efa7b 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -142,7 +142,8 @@ def query_json(json_content, query, delimiter='.'): elif isinstance(json_content, (dict, CaseInsensitiveDict)): json_content = json_content[key] else: - raise exception.ParseResponseError("response content is in text format! failed to query key {}!".format(key)) + raise exception.ParseResponseError( + "response content is in text format! failed to query key {}!".format(key)) except (KeyError, ValueError, IndexError): raise exception.ParseResponseError("failed to query json when extracting response!") diff --git a/tests/test_client.py b/tests/test_client.py index 6e13f47a..51331232 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -47,4 +47,5 @@ class TestHttpClient(ApiServerUnittest): } } kwargs = process_kwargs("POST", **kwargs) - self.assertEqual(kwargs["data"], '{"a": 1, "b": 2}') + self.assertIn('"a": 1', kwargs["data"]) + self.assertIn('"b": 2', kwargs["data"])