aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-02 11:37:18 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-02 11:37:18 +1200
commiteaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad (patch)
treea9a73ca4695beb00a6d83aa65cdc17945fc77107 /test
parent92cdca50c7a43a5ab59b435e73e3b17dbe01cd3b (diff)
downloadmitmproxy-eaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad.tar.gz
mitmproxy-eaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad.tar.bz2
mitmproxy-eaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad.zip
Fix non-deterministic test failures in export
We had various places in the code where we relied on incidental order of dict keys. Add a helper to multidict, and fix.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/data/test_flow_export/python_post_json.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/mitmproxy/data/test_flow_export/python_post_json.py b/test/mitmproxy/data/test_flow_export/python_post_json.py
index 7e105bf6..6c1b9740 100644
--- a/test/mitmproxy/data/test_flow_export/python_post_json.py
+++ b/test/mitmproxy/data/test_flow_export/python_post_json.py
@@ -6,11 +6,13 @@ headers = {
'content-type': 'application/json',
}
+
json = {
- "name": "example",
- "email": "example@example.com"
+ u'email': u'example@example.com',
+ u'name': u'example',
}
+
response = requests.request(
method='POST',
url=url,