mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 08:42:57 -04:00
Tests for domain validation
This commit is contained in:
parent
3c1c3c3e8d
commit
0fb4f7dc8b
1 changed files with 10 additions and 0 deletions
|
|
@ -385,7 +385,17 @@ class ChooseNamesTest(unittest.TestCase):
|
|||
|
||||
self.assertEqual(self._call(self.mock_install), [])
|
||||
|
||||
def test_get_valid_domains(self):
|
||||
from letsencrypt.display_ops import get_valid_domains
|
||||
all_valid = ["example.com", "second.example.com",
|
||||
"also.example.com"]
|
||||
all_invalid = ["xn--ls8h.tld", "*.wildcard.com", "notFQDN"]
|
||||
two_valid = ["example.com", "xn--ls8h.tld", "also.example.com"]
|
||||
self.assertEqual(get_valid_domains(all_valid), all_valid)
|
||||
self.assertEqual(get_valid_domains(all_invalid), [])
|
||||
self.assertEqual(len(get_valid_domains(two_valid)), 2)
|
||||
|
||||
|
||||
class SuccessInstallationTest(unittest.TestCase):
|
||||
# pylint: disable=too-few-public-methods
|
||||
"""Test the success installation message."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue