Unit test for cab_compliant = true

This commit is contained in:
sayali 2020-10-14 14:48:54 -07:00
parent 0e3638b86c
commit 90839b4d4b
1 changed files with 10 additions and 0 deletions

View File

@ -196,6 +196,16 @@ def test_certificate_output_schema_subject_details(session, certificate, issuer_
assert data["organization"] == "Daniel San & co" assert data["organization"] == "Daniel San & co"
assert data["organizationalUnit"] == "Karate Lessons" assert data["organizationalUnit"] == "Karate Lessons"
# Mark authority as cab-compliant
update_options(certificate.authority.id, '[{"name": "cab_compliant","value":true}]')
data, errors = CertificateOutputSchema().dump(certificate)
assert not errors
assert "country" not in data
assert "state" not in data
assert "location" not in data
assert "organization" not in data
assert "organizationalUnit" not in data
def test_certificate_edit_schema(session): def test_certificate_edit_schema(session):
from lemur.certificates.schemas import CertificateEditInputSchema from lemur.certificates.schemas import CertificateEditInputSchema