File tree 2 files changed +3
-2
lines changed
tests/integration/artifacts 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ Fix pytest CA was re-generated on every pytest run, preventing tests in local browsers.
Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ def get_ca(name, root_ca=None) -> CertKey:
69
69
os .makedirs (ca_filename .parent , exist_ok = True )
70
70
certkey = None
71
71
72
- if os . path . exists (cert_path ) and os . path . exists (key_path ):
72
+ if cert_path . exists () and key_path . exists ():
73
73
with open (key_path , "rb" ) as pem_in :
74
74
private_key = load_pem_private_key (pem_in .read (), None , default_backend ())
75
75
with open (cert_path , "rb" ) as pem_in :
76
76
cert = x509 .load_pem_x509_certificate (pem_in .read (), default_backend ())
77
- if cert .not_valid_after_utc < pytz .UTC .localize (datetime .datetime .now ()):
77
+ if cert .not_valid_after_utc > pytz .UTC .localize (datetime .datetime .now ()):
78
78
certkey = CertKey (ca = root_ca , cert = cert , key = private_key )
79
79
if not certkey :
80
80
certkey = generate_ca (name , root_ca )
You can’t perform that action at this time.
0 commit comments