From f0c059752fcd8b36862e12c77a98ce351c6d5442 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Fri, 6 Nov 2015 12:15:53 +0200 Subject: [PATCH] Added test for mod_macro check in domain names --- .../letsencrypt_apache/tests/configurator_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py b/letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py index 2e335ea00..963948d6e 100644 --- a/letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py +++ b/letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py @@ -183,6 +183,11 @@ class TwoVhost80Test(util.ApacheTest): self.assertEqual(len(self.vh_truth)-1, len(self.config._without_modmacro(self.vh_truth))) + def test_is_mod_macro(self): + # pylint: disable=protected-access + self.assertEqual(self.config._is_mod_macro("$domain"), True) + self.assertEqual(self.config._is_mod_macro("www.example.com"), False) + def test_non_default_vhosts(self): # pylint: disable=protected-access self.assertEqual(len(self.config._non_default_vhosts()), 4)