Skip to content

Commit

Permalink
Merge pull request #167 from italia/fix_165
Browse files Browse the repository at this point in the history
Update metadata_extra.py
  • Loading branch information
Giuseppe De Marco authored Oct 26, 2023
2 parents 4befa3e + 5585c20 commit 07c17c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/spid_sp_test/metadata_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ def test_Signature_extra(self):

self._assertTrue(
(
datetime.datetime.strptime(sign_cert[3], "%b %d %H:%M:%S %Y")
>= datetime.datetime.now()
datetime.datetime != "" and (
datetime.datetime.strptime(sign_cert[3], "%b %d %H:%M:%S %Y")
>= datetime.datetime.now()
)
),
f"The certificate #{i} is expired. It was valid till {sign_cert[3]}",
f"The certificate #{i} is expired or datetime is not valid. It was valid till {sign_cert[3]}",
**_data,
)
os.remove(fname)
Expand Down

0 comments on commit 07c17c2

Please sign in to comment.