1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--- 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)
|