File: test_414_httpx.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 (13 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
import httpretty
import httpx
from sure import expect

@httpretty.activate(verbose=True, allow_net_connect=False)
def test_httpx():
    "#414 httpx support"
    httpretty.register_uri(httpretty.GET, "https://blog.falcao.it/",
                           body="Posts")

    response = httpx.get('https://blog.falcao.it')

    expect(response.text).to.equal("Posts")