pytest_httpserver 1.0.12__tar.gz → 1.1.0__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.12 → pytest_httpserver-1.1.0}/CHANGES.rst +14 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/PKG-INFO +1 -1
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/conf.py +1 -1
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pyproject.toml +1 -1
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/pytest_plugin.py +3 -3
- pytest_httpserver-1.1.0/tests/test_log_leak.py +29 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_release.py +1 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/CONTRIBUTION.md +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/LICENSE +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/README.md +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/Makefile +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/_static/.placeholder +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/api.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/background.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/changes.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/fixtures.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/guide.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/howto.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/index.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/patch.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/tutorial.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/doc/upgrade.rst +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/example.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/example_pytest.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/__init__.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/hooks.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/httpserver.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/pytest_httpserver/py.typed +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/Makefile +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/README +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/rootCA.cnf +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/rootCA.crt +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/rootCA.key +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/rootCA.srl +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/server.cnf +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/server.crt +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/server.csr +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/server.key +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/assets/v3.ext +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/conftest.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_example_blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_example_query_params1.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_example_query_params2.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_authorization_headers.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_case_insensitive_matcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_check.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_check_handler_errors.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_custom_handler.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_custom_hooks.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_header_value_matcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_hooks.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_json_matcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_log_querying.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_query_params_dict.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_query_params_never_do_this.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_query_params_proper_use.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_regexp.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_timeout_requests.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_url_matcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_wait_success.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_blocking_httpserver.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_handler_errors.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_headers.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_hooks.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_ip_protocols.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_json_matcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_log_querying.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_mixed.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_oneshot.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_ordered.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_parse_qs.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_permanent.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_port_changing.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_querymatcher.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_querystring.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_ssl.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_threaded.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_urimatch.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_wait.py +0 -0
- {pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/test_with_statement.py +0 -0
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Release Notes
|
|
3
3
|
=============
|
|
4
4
|
|
|
5
|
+
.. _Release Notes_1.1.0:
|
|
6
|
+
|
|
7
|
+
1.1.0
|
|
8
|
+
=====
|
|
9
|
+
|
|
10
|
+
.. _Release Notes_1.1.0_Bug Fixes:
|
|
11
|
+
|
|
12
|
+
Bug Fixes
|
|
13
|
+
---------
|
|
14
|
+
|
|
15
|
+
- Fixed an issue related to the leak of httpserver state between the tests
|
|
16
|
+
when httpserver is destructed before the other fixtures. `#352 <https://github.com/csernazs/pytest-httpserver/issues/352>`_
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
.. _Release Notes_1.0.12:
|
|
6
20
|
|
|
7
21
|
1.0.12
|
|
@@ -64,8 +64,8 @@ def pytest_sessionfinish(session, exitstatus): # noqa: ARG001
|
|
|
64
64
|
@pytest.fixture()
|
|
65
65
|
def httpserver(make_httpserver):
|
|
66
66
|
server = make_httpserver
|
|
67
|
-
yield server
|
|
68
67
|
server.clear()
|
|
68
|
+
return server
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
@pytest.fixture(scope="session")
|
|
@@ -81,8 +81,8 @@ def make_httpserver_ipv4(httpserver_ssl_context):
|
|
|
81
81
|
@pytest.fixture()
|
|
82
82
|
def httpserver_ipv4(make_httpserver_ipv4):
|
|
83
83
|
server = make_httpserver_ipv4
|
|
84
|
-
yield server
|
|
85
84
|
server.clear()
|
|
85
|
+
return server
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
@pytest.fixture(scope="session")
|
|
@@ -98,5 +98,5 @@ def make_httpserver_ipv6(httpserver_ssl_context):
|
|
|
98
98
|
@pytest.fixture()
|
|
99
99
|
def httpserver_ipv6(make_httpserver_ipv6):
|
|
100
100
|
server = make_httpserver_ipv6
|
|
101
|
-
yield server
|
|
102
101
|
server.clear()
|
|
102
|
+
return server
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
import requests
|
|
3
|
+
|
|
4
|
+
from pytest_httpserver import HTTPServer
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Client:
|
|
8
|
+
def __init__(self) -> None:
|
|
9
|
+
self.url: str | None = None
|
|
10
|
+
|
|
11
|
+
def get(self):
|
|
12
|
+
if self.url:
|
|
13
|
+
requests.get(self.url)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pytest.fixture()
|
|
17
|
+
def my_fixture():
|
|
18
|
+
client = Client()
|
|
19
|
+
yield client
|
|
20
|
+
client.get()
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_1(my_fixture: Client, httpserver: HTTPServer):
|
|
24
|
+
httpserver.expect_request("/foo").respond_with_data("OK")
|
|
25
|
+
my_fixture.url = httpserver.url_for("/foo")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test_2(httpserver: HTTPServer):
|
|
29
|
+
assert httpserver.log == []
|
|
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.12 → pytest_httpserver-1.1.0}/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
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_example_query_params1.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/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.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_custom_handler.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_custom_hooks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_json_matcher.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_log_querying.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/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.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_timeout_requests.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/tests/examples/test_howto_url_matcher.py
RENAMED
|
File without changes
|
{pytest_httpserver-1.0.12 → pytest_httpserver-1.1.0}/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
|