patch builtins open

This commit is contained in:
Erica Portnoy 2020-03-12 15:25:08 -07:00
parent c46ec17a0f
commit 34691fe558

View file

@ -1840,7 +1840,7 @@ class InstallSslOptionsConfTest(util.ApacheTest):
def test_open_module_file(self):
mock_open = mock.mock_open(read_data="testing 12 3")
with mock.patch("certbot_apache._internal.configurator.open", mock_open):
with mock.patch("six.moves.builtins.open", mock_open):
self.assertEqual (self.config._open_module_file("/nonsense/"), "testing 12 3")
if __name__ == "__main__":