mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix travis-ci job 152
This commit is contained in:
+2
-1
@@ -142,7 +142,8 @@ def query_json(json_content, query, delimiter='.'):
|
|||||||
elif isinstance(json_content, (dict, CaseInsensitiveDict)):
|
elif isinstance(json_content, (dict, CaseInsensitiveDict)):
|
||||||
json_content = json_content[key]
|
json_content = json_content[key]
|
||||||
else:
|
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):
|
except (KeyError, ValueError, IndexError):
|
||||||
raise exception.ParseResponseError("failed to query json when extracting response!")
|
raise exception.ParseResponseError("failed to query json when extracting response!")
|
||||||
|
|
||||||
|
|||||||
@@ -47,4 +47,5 @@ class TestHttpClient(ApiServerUnittest):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
kwargs = process_kwargs("POST", **kwargs)
|
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