Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Use http2bin instead of twitter for release test #104

Merged
merged 1 commit into from
Mar 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,22 @@ def test_abusing_nghttp2_org(self):
assert all(map(lambda p: p.scheme == 'https', pushes))
assert all(map(lambda p: p.method.lower() == 'get', pushes))

def test_hitting_twitter(self):
def test_hitting_http2bin_org(self):
"""
This test function uses the requests adapter and requests to talk to
Twitter. We can't use Twython and the API here because I don't want to
expose my app keys, and remembering to use environment variables is a
pain in the neck.
This test function uses the requests adapter and requests to talk to http2bin.
"""
s = requests.Session()
a = HTTP20Adapter()
s.mount('https://twitter', a)
s.mount('https://www.twitter', a)
s.mount('http://http2bin', a)
s.mount('http://www.http2bin', a)

# Here are some nice URLs.
urls = [
'https://twitter.com/',
'https://twitter.com/Lukasaoz',
'https://twitter.com/hynek',
'https://twitter.com/bitprophet',
'https://twitter.com/jessicamckellar',
'https://twitter.com/shazow',
'https://twitter.com/sigmavirus24',
'https://twitter.com/jillysciarilly',
'https://twitter.com/kennethreitz',
'http://www.http2bin.org/',
'http://www.http2bin.org/ip',
'http://www.http2bin.org/user-agent',
'http://www.http2bin.org/headers',
'http://www.http2bin.org/get',
]

# Go get everything.
Expand Down