Revize 1e4b402d
Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)
tests/integration_tests/services/crl_service_test.py | ||
---|---|---|
53 | 53 |
certificate_service_unique.set_certificate_revocation_status(baz_cert.certificate_id, "revoked", |
54 | 54 |
"privilegeWithdrawn") |
55 | 55 |
|
56 |
# split lines
|
|
56 |
# create index of revoked certificates
|
|
57 | 57 |
out = crl_service_unique.create_revoked_index(root_ca_cert.certificate_id) |
58 | 58 |
|
59 |
# convert revoked date fields |
|
59 |
# convert revoked date fields (revoked date fields change with each test run)
|
|
60 | 60 |
revoked_dates = [ |
61 | 61 |
convert_date_to_ca_index_format(cryptography_service.parse_cert_pem(foo_ca.pem_data)[2]), |
62 | 62 |
convert_date_to_ca_index_format(cryptography_service.parse_cert_pem(bar_ca.pem_data)[2]), |
63 | 63 |
convert_date_to_ca_index_format(cryptography_service.parse_cert_pem(baz_cert.pem_data)[2]), |
64 | 64 |
] |
65 | 65 |
|
66 |
# convert valid_to date fields |
|
66 |
# convert valid_to date fields (expiration date fields change with each test run)
|
|
67 | 67 |
valid_to_dates = [ |
68 | 68 |
convert_valid_to_date_to_ca_index_format(foo_ca.valid_to), |
69 | 69 |
convert_valid_to_date_to_ca_index_format(bar_ca.valid_to), |
70 | 70 |
convert_valid_to_date_to_ca_index_format(baz_cert.valid_to), |
71 | 71 |
] |
72 | 72 |
|
73 |
# arrange expected lines |
|
73 | 74 |
expected_lines = [ |
74 | 75 |
f"R {valid_to_dates[0]} {revoked_dates[0]},unspecified 02 unknown /CN=Foo CA/L=Brno", |
75 | 76 |
f"R {valid_to_dates[1]} {revoked_dates[1]},keyCompromise 03 unknown /CN=Bar CA/C=CZ/L=Pilsen", |
Také k dispozici: Unified diff
Re #8575 - Improved crl_service_test.py comments