You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py...

40 lines
1.6 KiB

--- a/tests/test_https.py 2021-05-24 12:10:07.335676451 -0700
+++ b/tests/test_https.py 2021-05-24 12:10:23.966572498 -0700
@@ -11,17 +11,20 @@
httpsserver = plugin.httpsserver
+@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
def test_httpsserver_funcarg(httpsserver):
assert isinstance(httpsserver, https.SecureContentServer)
assert httpsserver.is_alive()
assert httpsserver.server_address
+@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
def test_server_does_not_serve_file_at_startup(httpsserver):
assert httpsserver.code == 204
assert httpsserver.content == ''
+@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
def test_some_content_retrieval(httpsserver):
httpsserver.serve_content('TEST!')
resp = requests.get(httpsserver.url, verify=False)
@@ -29,6 +32,7 @@
assert resp.status_code == 200
+@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
def test_GET_request(httpsserver):
httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
resp = requests.get(httpsserver.url, headers={'User-Agent': 'Test method'}, verify=False)
@@ -37,6 +41,7 @@
assert 'text/plain' in resp.headers['Content-type']
+@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310")
def test_HEAD_request(httpsserver):
httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
print(httpsserver.url)