Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 5f4b9c8d

Přidáno uživatelem Michal Seják před téměř 4 roky(ů)

Re #8704 - Added an invalid extension test.

Zobrazit rozdíly:

tests/integration_tests/rest_api/certificates_test.py
562 562
    assert "".join(expected) == actual
563 563

  
564 564

  
565
def test_invalid_extensions(server):
566
    certificate = {
567
        "subject": {
568
            "C": "EN",
569
            "CN": "Certificate to be revoked",
570
            "L": "Revokeland",
571
            "O": "Revoked organization",
572
            "OU": "Revocation dep"
573
        },
574
        "usage": {
575
            "CA": False,
576
            "SSL": False,
577
            "authentication": False,
578
            "digitalSignature": True
579
        },
580
        "validityDays": 60,
581
        "extensions": "woowee=thisshouldbeinvalidithink"
582
    }
583
    created_ret = server.post("/api/certificates", content_type="application/json", json=certificate)
584
    assert created_ret.status_code == 500
585

  
586

  
565 587
def test_get_cert_private_key(server):
566 588
    for i in range(6, 2, -1):
567 589
        ret = server.get(f"/api/certificates/{i}/privatekey")

Také k dispozici: Unified diff