Revize c6a4e5d4
Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)
tests/unit_tests/services/certificate/check_subject_is_valid_test.py | ||
---|---|---|
4 | 4 |
from src.services.certificate_service import InvalidSubjectAttribute |
5 | 5 |
|
6 | 6 |
|
7 |
def test_check_subject_is_valid_country_correct(certificate_service): |
|
8 |
certificate_service._CertificateService__check_subject_is_valid(Subject(common_name="Foo", country="CZ")) |
|
7 |
@pytest.mark.parametrize( |
|
8 |
"cc", |
|
9 |
[ |
|
10 |
pytest.param(""), |
|
11 |
pytest.param("CZ"), |
|
12 |
], |
|
13 |
) |
|
14 |
def test_check_subject_is_valid_country_correct(certificate_service, cc): |
|
15 |
certificate_service._CertificateService__check_subject_is_valid(Subject(common_name="Foo", country=cc)) |
|
9 | 16 |
|
10 | 17 |
|
11 | 18 |
def test_check_subject_is_valid_without_country_code(certificate_service): |
Také k dispozici: Unified diff
Extended check_subject_is_valid_test.py with a parametrized test (added "" country code)