def setUp(self, *args, **kwargs): # pylint: disable=arguments-differ super().setUp(*args, **kwargs) self.account_key = self.rsa512jwk self.achalls: List[achallenges.KeyAuthorizationAnnotatedChallenge] = [] vh_truth = util.get_vh_truth(self.temp_dir, "debian_apache_2_4/multiple_vhosts") # Takes the vhosts for encryption-example.demo, certbot.demo # and vhost.in.rootconf self.vhosts = [vh_truth[0], vh_truth[3], vh_truth[10]] for i in range(NUM_ACHALLS): self.achalls.append( achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb( challenges.HTTP01(token=((chr(ord('a') + i).encode() * 16))), "pending"), domain=self.vhosts[i].name, account_key=self.account_key)) modules = ["ssl", "rewrite", "authz_core", "authz_host"] for mod in modules: self.config.parser.modules["mod_{0}.c".format(mod)] = None self.config.parser.modules[mod + "_module"] = None from certbot_apache._internal.http_01 import ApacheHttp01 self.http = ApacheHttp01(self.config)
def setUp(self): # pylint: disable=arguments-differ super().setUp() self.config = util.get_apache_configurator( self.config_path, self.vhost_path, self.config_dir, self.work_dir, os_info="debian") self.config = self.mock_deploy_cert(self.config) self.vh_truth = util.get_vh_truth(self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def setUp(self): # pylint: disable=arguments-differ super().setUp() self.config = util.get_apache_configurator( self.config_path, self.vhost_path, self.config_dir, self.work_dir, use_parsernode=True) self.vh_truth = util.get_vh_truth( self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def setUp(self): # pylint: disable=arguments-differ super(ConfiguratorReverterTest, self).setUp() self.config = util.get_apache_configurator(self.config_path, self.vhost_path, self.config_dir, self.work_dir) self.vh_truth = util.get_vh_truth(self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def setUp(self): # pylint: disable=arguments-differ super(AugeasParserNodeTest, self).setUp() with mock.patch("certbot_apache._internal.configurator.ApacheConfigurator.get_parsernode_root") as mock_parsernode: mock_parsernode.side_effect = _get_augeasnode_mock( os.path.join(self.config_path, "apache2.conf")) self.config = util.get_apache_configurator( self.config_path, self.vhost_path, self.config_dir, self.work_dir, use_parsernode=True) self.vh_truth = util.get_vh_truth( self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def setUp(self): # pylint: disable=arguments-differ super(AutoHSTSTest, self).setUp() self.config = util.get_apache_configurator( self.config_path, self.vhost_path, self.config_dir, self.work_dir) self.config.parser.modules.add("headers_module") self.config.parser.modules.add("mod_headers.c") self.config.parser.modules.add("ssl_module") self.config.parser.modules.add("mod_ssl.c") self.vh_truth = util.get_vh_truth( self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def setUp(self): self.base_dir = "/example_path" self.vhosts = util.get_vh_truth(self.base_dir, "debian_apache_2_4/multiple_vhosts")