blob: 25a58a93de9727ccc025cb837e27568ca129f9cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import httpretty
import requests
import eventlet
eventlet.monkey_patch(all=False, socket=True)
@httpretty.activate
def test_something():
httpretty.register_uri(httpretty.GET, 'https://example.com', body='foo')
requests.get('https://example.com').text.should.equal('foo')
|