Fixed and added test for JSON properties order.

This commit is contained in:
Alexander Nelzin committed 2014-11-13 23:56:05 +03:00
1 parent 0481957715
commit a2b12f75ea
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -63,3 +63,8 @@ class TestHTTPie:
assert HTTP_OK in r
assert '"User-Agent": "HTTPie' in r, r
assert '"Foo": "bar"' in r
def test_json_order(self, httpbin):
r = http('PATCH', httpbin.url + '/patch', 'order:={"map":{"1":"first","2":"second"}}')
assert HTTP_OK in r
assert r.json['data'] == '{"order": {"map": {"1": "first", "2": "second"}}}'