mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Remove one more implementation assumption from our tests
This commit is contained in:
parent
36fbd2e449
commit
8858c67ef3
1 changed files with 5 additions and 2 deletions
|
|
@ -42,8 +42,11 @@ class AutoHSTSTest(util.ApacheTest):
|
|||
@mock.patch("certbot_apache._internal.configurator.ApacheConfigurator.restart")
|
||||
@mock.patch("certbot_apache._internal.configurator.ApacheConfigurator.enable_mod")
|
||||
def test_autohsts_enable_headers_mod(self, mock_enable, _restart):
|
||||
self.config.parser.modules.discard("headers_module")
|
||||
self.config.parser.modules.discard("mod_header.c")
|
||||
try:
|
||||
del self.config.parser.modules["headers_module"]
|
||||
del self.config.parser.modules["mod_header.c"]
|
||||
except KeyError:
|
||||
pass
|
||||
self.config.enable_autohsts(mock.MagicMock(), ["ocspvhost.com"])
|
||||
self.assertTrue(mock_enable.called)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue