Import installer module directly in tests.

This commit is contained in:
Brad Warren
2017-08-04 10:12:54 -07:00
parent 4a3fd19c93
commit b37be61807
@@ -10,7 +10,7 @@ import io
import logging import logging
import unittest import unittest
import certbot_postfix from certbot_postfix import installer
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -56,7 +56,7 @@ class TestPostfixConfigGenerator(unittest.TestCase):
def testGetAllNames(self): def testGetAllNames(self):
sorted_names = ['fubard.org', 'mail.fubard.org'] sorted_names = ['fubard.org', 'mail.fubard.org']
postfix_config_gen = certbot_postfix.Installer( postfix_config_gen = installer.Installer(
self.config, self.config,
self.postfix_dir, self.postfix_dir,
fixup=True, fixup=True,
@@ -68,7 +68,7 @@ class TestPostfixConfigGenerator(unittest.TestCase):
return_vals = [('/etc/letsencrypt/live/www.fubard.org/fullchain.pem', return_vals = [('/etc/letsencrypt/live/www.fubard.org/fullchain.pem',
'/etc/letsencrypt/live/www.fubard.org/privkey.pem', '/etc/letsencrypt/live/www.fubard.org/privkey.pem',
'tests/main.cf'),] 'tests/main.cf'),]
postfix_config_gen = certbot_postfix.Installer( postfix_config_gen = installer.Installer(
self.config, self.config,
self.postfix_dir, self.postfix_dir,
fixup=True, fixup=True,
@@ -77,7 +77,7 @@ class TestPostfixConfigGenerator(unittest.TestCase):
self.assertEqual(return_vals, postfix_config_gen.get_all_certs_keys()) self.assertEqual(return_vals, postfix_config_gen.get_all_certs_keys())
def testGetAllCertsAndKeys_With_None(self): def testGetAllCertsAndKeys_With_None(self):
postfix_config_gen = certbot_postfix.Installer( postfix_config_gen = installer.Installer(
self.config, self.config,
self.postfix_dir, self.postfix_dir,
fixup=True, fixup=True,