File: test_howto_regexp.py

package info (click to toggle)
pytest-httpserver 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: python: 2,382; makefile: 77; sh: 21
file content (8 lines) | stat: -rw-r--r-- 187 bytes parent folder | download
1
2
3
4
5
6
7
8
import re

import requests


def test_httpserver_with_regexp(httpserver):
    httpserver.expect_request(re.compile("^/foo"), method="GET")
    requests.get(httpserver.url_for("/foobar"))