@@ -49,22 +49,14 @@ def test_ssl_assert_fingerprint_invalid_length(node_cls):
4949
5050@requires_ssl_assert_fingerprint_in_chain
5151@pytest .mark .parametrize ("node_cls" , [Urllib3HttpNode , RequestsHttpNode ])
52- @pytest .mark .parametrize (
53- "ssl_assert_fingerprint" ,
54- [
55- "18efbd94dda87e3598a1251f9440cd2f4fd1dbf08be007c1012e992e830ca262" ,
56- "18:EF:BD:94:DD:A8:7E:35:98:A1:25:1F:94:40:CD:2F:4F:D1:DB:F0:8B:E0:07:C1:01:2E:99:2E:83:0C:A2:62" ,
57- "18EFBD94DDA87E3598A1251F9440CD2F4FD1DBF08BE007C1012E992E830CA262" ,
58- ],
59- )
60- def test_assert_fingerprint_in_cert_chain (node_cls , ssl_assert_fingerprint ):
52+ def test_assert_fingerprint_in_cert_chain (node_cls , cert_fingerprint , httpbin_secure ):
6153 with warnings .catch_warnings (record = True ) as w :
6254 node = node_cls (
6355 NodeConfig (
6456 "https" ,
65- "www.elastic.co" ,
66- 443 ,
67- ssl_assert_fingerprint = ssl_assert_fingerprint ,
57+ httpbin_secure . host ,
58+ httpbin_secure . port ,
59+ ssl_assert_fingerprint = cert_fingerprint ,
6860 )
6961 )
7062 meta , _ = node .perform_request ("GET" , "/" )
@@ -75,7 +67,7 @@ def test_assert_fingerprint_in_cert_chain(node_cls, ssl_assert_fingerprint):
7567
7668@requires_ssl_assert_fingerprint_in_chain
7769@pytest .mark .parametrize ("node_cls" , [Urllib3HttpNode , RequestsHttpNode ])
78- def test_assert_fingerprint_in_cert_chain_failure (node_cls ):
70+ def test_assert_fingerprint_in_cert_chain_failure (node_cls , httpbin_secure , cert_fingerprint ):
7971 node = node_cls (
8072 NodeConfig (
8173 "https" ,
@@ -97,4 +89,4 @@ def test_assert_fingerprint_in_cert_chain_failure(node_cls):
9789 in err
9890 )
9991 # This is the root CA for httpbin.org with a leading comma to denote more than one cert was listed.
100- assert '"18efbd94dda87e3598a1251f9440cd2f4fd1dbf08be007c1012e992e830ca262"' in err
92+ assert '"18efbd94dda87e3598a1251f9440cd2f4fd1dbf08be007c1012e992e830ca262", ' in err
0 commit comments