File: test_eventlet.py

package info (click to toggle)
python-httpretty 1.1.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 712 kB
  • sloc: python: 4,233; makefile: 72
file content (11 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (2)
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')