diff options
Diffstat (limited to 'test/test_certutils.py')
-rw-r--r-- | test/test_certutils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_certutils.py b/test/test_certutils.py index 9b917dc6..582fb9c4 100644 --- a/test/test_certutils.py +++ b/test/test_certutils.py @@ -35,6 +35,15 @@ class TestCertStore: assert c.get_cert("foo.com", [], ca) c.cleanup() + def test_check_domain(self): + c = certutils.CertStore() + assert c.check_domain("foo") + assert c.check_domain("\x01foo") + assert not c.check_domain("\xfefoo") + assert not c.check_domain("xn--\0") + assert not c.check_domain("foo..foo") + assert not c.check_domain("foo/foo") + class TestDummyCert: def test_with_ca(self): |