mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Removed some now obsolete mock code from tests
This commit is contained in:
parent
f5862a7a4f
commit
39e4053b82
1 changed files with 2 additions and 12 deletions
|
|
@ -128,20 +128,10 @@ class TwoVhost80Test(util.ApacheTest):
|
|||
self.assertEqual(found, 6)
|
||||
|
||||
# Handle case of non-debian layout get_virtual_hosts
|
||||
orig_conf = self.config.conf
|
||||
with mock.patch(
|
||||
"letsencrypt_apache.configurator.ApacheConfigurator.conf"
|
||||
) as mock_conf:
|
||||
def conf_sideeffect(key):
|
||||
"""Handle calls to configurator.conf()
|
||||
:param key: configuration key
|
||||
:return: configuration value
|
||||
"""
|
||||
if key == "handle-sites":
|
||||
return False
|
||||
else:
|
||||
return orig_conf(key)
|
||||
mock_conf.side_effect = conf_sideeffect
|
||||
) as mock_conf:
|
||||
mock_conf.return_value = False
|
||||
vhs = self.config.get_virtual_hosts()
|
||||
self.assertEqual(len(vhs), 6)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue