mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 06:15:36 -04:00
Remove _write_config
This commit is contained in:
parent
3b2e9e49be
commit
b9177948d3
1 changed files with 0 additions and 7 deletions
|
|
@ -58,7 +58,6 @@ class InstallerTest(certbot_test_util.TempDirTestCase):
|
|||
def test_set_config_dir(self):
|
||||
self.config.postfix_config_dir = os.path.join(self.tempdir, "subdir")
|
||||
os.mkdir(self.config.postfix_config_dir)
|
||||
self._write_config(names_only_config)
|
||||
installer = self._create_installer()
|
||||
|
||||
expected = self.config.postfix_config_dir
|
||||
|
|
@ -76,7 +75,6 @@ class InstallerTest(certbot_test_util.TempDirTestCase):
|
|||
|
||||
@mock.patch("certbot_postfix.installer.util.check_output")
|
||||
def test_get_all_names(self, mock_check_output):
|
||||
self._write_config(names_only_config)
|
||||
installer = self._create_prepared_installer()
|
||||
mock_check_output.side_effect = names_only_config.splitlines()
|
||||
|
||||
|
|
@ -84,11 +82,6 @@ class InstallerTest(certbot_test_util.TempDirTestCase):
|
|||
self.assertTrue("fubard.org" in result)
|
||||
self.assertTrue("mail.fubard.org" in result)
|
||||
|
||||
def _write_config(self, content):
|
||||
config_dir = self.config.postfix_config_dir
|
||||
with open(os.path.join(config_dir, "main.cf"), "w") as f:
|
||||
f.write(content)
|
||||
|
||||
def test_get_config_var_success(self):
|
||||
self.config.postfix_config_dir = None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue