Skip to content

Commit

Permalink
case sensitivity of header attribute names
Browse files Browse the repository at this point in the history
illustrates: kevin1024#91 but does not solve the problem.
  • Loading branch information
hartsock committed Jul 30, 2014
1 parent a23c5d8 commit a86a3f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/integration/test_wild.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,15 @@ def test_cookies(tmpdir):
r1 = s.get("http://httpbin.org/cookies/set?k1=v1&k2=v2")
r2 = s.get("http://httpbin.org/cookies")
assert len(r2.json()['cookies']) == 2

def test_case_insensitivity(tmpdir):
testfile = str(tmpdir.join('case_insensitivity.yml'))
with vcr.use_cassette(testfile):
conn = httplib.HTTPConnection('httpbin.org')
conn.request('GET', "/cookies/set?k1=v1&k2=v2")
r1 = conn.getresponse()
cookie_data1 = r1.getheader('set-cookie')
conn.request('GET', "/cookies/set?k1=v1&k2=v2")
r2 = conn.getresponse()
cookie_data2 = r2.getheader('Set-Cookie')
assert cookie_data1 == cookie_data2

0 comments on commit a86a3f7

Please sign in to comment.