mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
reset set_by_cli between each test (#9567)
This commit is contained in:
7
certbot/tests/conftest.py
Normal file
7
certbot/tests/conftest.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from certbot._internal import cli
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def reset_cli_global():
|
||||
cli.set_by_cli.detector = None
|
||||
@@ -422,7 +422,6 @@ class RevokeTest(test_util.TempDirTestCase):
|
||||
if not args:
|
||||
args = 'revoke --cert-path={0} '
|
||||
args = args.format(self.tmp_cert_path).split()
|
||||
cli.set_by_cli.detector = None # required to reset set_by_cli state
|
||||
plugins = disco.PluginsRegistry.find_all()
|
||||
config = configuration.NamespaceConfig(
|
||||
cli.prepare_and_parse_args(plugins, args))
|
||||
@@ -588,7 +587,6 @@ class ReconfigureTest(test_util.TempDirTestCase):
|
||||
|
||||
def _call(self, passed_args):
|
||||
full_args = passed_args + ['--config-dir', self.config_dir]
|
||||
cli.set_by_cli.detector = None # required to reset set_by_cli state
|
||||
plugins = disco.PluginsRegistry.find_all()
|
||||
config = configuration.NamespaceConfig(
|
||||
cli.prepare_and_parse_args(plugins, full_args))
|
||||
|
||||
Reference in New Issue
Block a user