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

Commit

Permalink
Merge pull request #104 from jdecuyper/update-release-test
Browse files Browse the repository at this point in the history
Use http2bin instead of twitter for release test
  • Loading branch information
Lukasa committed Mar 22, 2015
2 parents 8880c62 + e279ec9 commit 4519ec4
Showing 1 changed file with 9 additions and 16 deletions.
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

0 comments on commit 4519ec4

Please sign in to comment.