示例#1
0
    def test_get_valid_domains(self):
        from certbot.display.ops import get_valid_domains

        all_valid = ["example.com", "second.example.com", "also.example.com"]
        all_invalid = ["xn--ls8h.tld", "*.wildcard.com", "notFQDN", "uniçodé.com"]
        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)
示例#2
0
    def test_get_valid_domains(self):
        from certbot.display.ops import get_valid_domains

        all_valid = ["example.com", "second.example.com", "also.example.com", "under_score.example.com", "justtld"]
        all_invalid = ["öóòps.net", "*.wildcard.com", "uniçodé.com"]
        two_valid = ["example.com", "úniçøde.com", "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)
示例#3
0
 def test_get_valid_domains(self):
     from certbot.display.ops import get_valid_domains
     all_valid = ["example.com", "second.example.com",
                  "also.example.com", "under_score.example.com",
                  "justtld", "*.wildcard.com"]
     all_invalid = ["öóòps.net", "uniçodé.com"]
     two_valid = ["example.com", "úniçøde.com", "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)
示例#4
0
 def test_get_valid_domains(self):
     from certbot.display.ops import get_valid_domains
     all_valid = ["example.com", "second.example.com", "also.example.com"]
     all_invalid = [
         "xn--ls8h.tld", "*.wildcard.com", "notFQDN", "uniçodé.com"
     ]
     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)