Skip to content
Myr

Add unit-test to reproduce encoding error.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Eric Scrivner · committed by Eric Scrivner · parent 4701243 · Browse files · 1 file+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:test_requests.py+9 added-1 removed
1 unmodified line
2# -*- coding: utf-8 -*-34"""Tests for Requests."""56import json7import os8import unittest910import requests
232 unmodified lines
243 r = requests.get(httpbin('get'), params=dict(test=['foo', 'baz']))244 self.assertEqual(r.status_code, 200)245 self.assertEqual(r.url, httpbin('get?test=foo&test=baz'))246247 def test_different_encodings_dont_break_post(self):248 r = requests.post(httpbin('post'),249 data={'stuff': json.dumps({'a': 123})},250 params={'blah': 'asdf1234'},251 files={'file': ('test_requests.py', open(__file__, 'rb'))})252 self.assertEqual(r.status_code, 200)253254255256if __name__ == '__main__':249 unittest.main()257 unittest.main()