mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix travis-ci job 152
This commit is contained in:
@@ -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!")
|
||||
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user