Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 970c303d

Přidáno uživatelem Michal Seják před asi 4 roky(ů)

Re #8572 - Adjusted CertificateService unit tests according to the new `delete_certificate` specification.

Zobrazit rozdíly:

tests/integration_tests/services/certificate_service_test.py
210 210

  
211 211

  
212 212
def test_delete_cert(private_key_service, certificate_service):
213
    assert not certificate_service.delete_certificate(-1)
213
    with pytest.raises(CertificateNotFoundException):
214
        certificate_service.delete_certificate(-1)
214 215

  
215 216
    root_ca_private_key = private_key_service.create_new_key(passphrase="foobar")
216 217

  
......
225 226
    assert original_len + 1 == len_inserted
226 227

  
227 228
    # TODO delete should delete all children?
228
    assert certificate_service.delete_certificate(root_ca_cert.certificate_id)
229
    assert not certificate_service.delete_certificate(root_ca_cert.certificate_id)
229
    certificate_service.delete_certificate(root_ca_cert.certificate_id)
230
    with pytest.raises(CertificateNotFoundException):
231
        certificate_service.delete_certificate(root_ca_cert.certificate_id)
230 232

  
231 233
    assert len_inserted - 1 == len(certificate_service.get_certificates())
232 234

  

Také k dispozici: Unified diff