pytest_httpserver 1.0.11__tar.gz → 1.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/CHANGES.rst +14 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/PKG-INFO +1 -1
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/conf.py +1 -1
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pyproject.toml +1 -1
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_log_querying.py +33 -24
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/CONTRIBUTION.md +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/LICENSE +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/README.md +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/Makefile +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/_static/.placeholder +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/api.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/background.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/changes.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/fixtures.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/guide.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/howto.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/index.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/patch.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/tutorial.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/doc/upgrade.rst +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/example.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/example_pytest.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/__init__.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/hooks.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/httpserver.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/py.typed +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/pytest_plugin.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/Makefile +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/README +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/rootCA.cnf +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/rootCA.crt +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/rootCA.key +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/rootCA.srl +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/server.cnf +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/server.crt +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/server.csr +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/server.key +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/assets/v3.ext +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/conftest.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_example_blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_example_query_params1.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_example_query_params2.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_authorization_headers.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_case_insensitive_matcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_check.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_check_handler_errors.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_custom_handler.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_custom_hooks.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_header_value_matcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_hooks.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_json_matcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_log_querying.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_query_params_dict.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_query_params_never_do_this.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_query_params_proper_use.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_regexp.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_timeout_requests.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_url_matcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_wait_success.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_handler_errors.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_headers.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_hooks.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_ip_protocols.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_json_matcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_mixed.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_oneshot.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_ordered.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_parse_qs.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_permanent.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_port_changing.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_querymatcher.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_querystring.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_release.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_ssl.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_threaded.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_urimatch.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_wait.py +0 -0
- {pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/test_with_statement.py +0 -0
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Release Notes
|
|
3
3
|
=============
|
|
4
4
|
|
|
5
|
+
.. _Release Notes_1.0.12:
|
|
6
|
+
|
|
7
|
+
1.0.12
|
|
8
|
+
======
|
|
9
|
+
|
|
10
|
+
.. _Release Notes_1.0.12_Bug Fixes:
|
|
11
|
+
|
|
12
|
+
Bug Fixes
|
|
13
|
+
---------
|
|
14
|
+
|
|
15
|
+
- Fix pytest-httpserver's own tests related to log querying. No functional
|
|
16
|
+
changes in pytest-httpserver code itself. `#345 <https://github.com/csernazs/pytest-httpserver/issues/345>`_
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
.. _Release Notes_1.0.11:
|
|
6
20
|
|
|
7
21
|
1.0.11
|
|
@@ -35,39 +35,48 @@ def test_verify(httpserver: HTTPServer):
|
|
|
35
35
|
def test_verify_assert_msg(httpserver: HTTPServer):
|
|
36
36
|
httpserver.no_handler_status_code = 404
|
|
37
37
|
httpserver.expect_request("/foo", json={"foo": "bar"}, method="POST").respond_with_data("OK")
|
|
38
|
-
|
|
38
|
+
headers = {"User-Agent": "requests", "Accept-Encoding": "gzip, deflate"}
|
|
39
|
+
assert requests.get(httpserver.url_for("/foo"), headers=headers).status_code == 404
|
|
40
|
+
|
|
41
|
+
expected_lines = [
|
|
42
|
+
"Matching request found 0 times but expected 1 times.",
|
|
43
|
+
"Expected request: <RequestMatcher uri='/foo' method='POST' query_string=None headers={} data"
|
|
44
|
+
"=None json={'foo': 'bar'}>",
|
|
45
|
+
"Found 1 similar request(s):",
|
|
46
|
+
"--- Similar Request Start",
|
|
47
|
+
"Path: /foo",
|
|
48
|
+
"Method: GET",
|
|
49
|
+
"Body: b''",
|
|
50
|
+
f"Headers: Host: localhost:{httpserver.port}",
|
|
51
|
+
"User-Agent: requests",
|
|
52
|
+
"Accept-Encoding: gzip, deflate",
|
|
53
|
+
"Accept: */*",
|
|
54
|
+
"Connection: keep-alive",
|
|
55
|
+
"",
|
|
56
|
+
"",
|
|
57
|
+
"Query String: ''",
|
|
58
|
+
"--- Similar Request End",
|
|
59
|
+
]
|
|
39
60
|
|
|
40
61
|
with pytest.raises(AssertionError) as err:
|
|
41
62
|
httpserver.assert_request_made(RequestMatcher("/foo", json={"foo": "bar"}, method="POST"))
|
|
42
63
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Found 1 similar request(s):
|
|
46
|
-
--- Similar Request Start
|
|
47
|
-
Path: /foo
|
|
48
|
-
Method: GET
|
|
49
|
-
Body: b''
|
|
50
|
-
Headers: Host: localhost:{httpserver.port}\r
|
|
51
|
-
User-Agent: requests\r
|
|
52
|
-
Accept-Encoding: gzip, deflate\r
|
|
53
|
-
Accept: */*\r
|
|
54
|
-
Connection: keep-alive\r
|
|
55
|
-
\r
|
|
56
|
-
|
|
57
|
-
Query String: ''
|
|
58
|
-
--- Similar Request End
|
|
59
|
-
""" # noqa: E501
|
|
60
|
-
assert str(err.value) == expected_message
|
|
64
|
+
actual_lines = [x.strip() for x in str(err.value).splitlines()][: len(expected_lines)]
|
|
65
|
+
assert actual_lines == expected_lines
|
|
61
66
|
|
|
62
67
|
|
|
63
68
|
def test_verify_assert_msg_no_similar_requests(httpserver: HTTPServer):
|
|
64
69
|
httpserver.expect_request("/foo", json={"foo": "bar"}, method="POST").respond_with_data("OK")
|
|
65
70
|
|
|
71
|
+
expected_lines = [
|
|
72
|
+
"Matching request found 0 times but expected 1 times.",
|
|
73
|
+
"Expected request: <RequestMatcher uri='/foo' method='POST' query_string=None headers={} data"
|
|
74
|
+
"=None json={'foo': 'bar'}>",
|
|
75
|
+
"No similar requests found.",
|
|
76
|
+
]
|
|
77
|
+
|
|
66
78
|
with pytest.raises(AssertionError) as err:
|
|
67
79
|
httpserver.assert_request_made(RequestMatcher("/foo", json={"foo": "bar"}, method="POST"))
|
|
68
80
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
No similar requests found.
|
|
72
|
-
"""
|
|
73
|
-
assert str(err.value) == expected_message
|
|
81
|
+
actual_lines = [x.strip() for x in str(err.value).splitlines()][: len(expected_lines)]
|
|
82
|
+
assert actual_lines == expected_lines
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/pytest_httpserver/blocking_httpserver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_example_query_params1.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_example_query_params2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_custom_handler.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_custom_hooks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_json_matcher.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_log_querying.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_query_params_dict.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_timeout_requests.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_url_matcher.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.11 → pytest_httpserver-1.0.12}/tests/examples/test_howto_wait_success.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|