mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:15:42 +02:00
Since we have a hook now, let's be done with all this unicode nonsense
This commit is contained in:
+1
-2
@@ -1315,7 +1315,7 @@ class WebrootMapProcessor(argparse.Action): # pylint: disable=missing-docstring
|
||||
def __call__(self, parser, config, webroot_map_arg, option_string=None):
|
||||
webroot_map = json.loads(webroot_map_arg)
|
||||
for domains, webroot_path in webroot_map.iteritems():
|
||||
_process_domain(config, domains, [webroot_path])
|
||||
_process_domain(config, str(domains), [str(webroot_path)])
|
||||
|
||||
|
||||
class DomainFlagProcessor(argparse.Action): # pylint: disable=missing-docstring
|
||||
@@ -1324,7 +1324,6 @@ class DomainFlagProcessor(argparse.Action): # pylint: disable=missing-docstring
|
||||
_process_domain(config, domain_arg)
|
||||
|
||||
|
||||
|
||||
def setup_log_file_handler(args, logfile, fmt):
|
||||
"""Setup file debug logging."""
|
||||
log_file_path = os.path.join(args.logs_dir, logfile)
|
||||
|
||||
@@ -421,18 +421,18 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
||||
self.assertRaises(errors.Error, cli.prepare_and_parse_args, plugins, webroot_args)
|
||||
|
||||
simple_map = '{"eg.com" : "/tmp"}'
|
||||
expected_map = {u"eg.com": u"/tmp"}
|
||||
expected_map = {"eg.com": "/tmp"}
|
||||
self._webroot_map_test(simple_map, None, None, expected_map, ["eg.com"])
|
||||
|
||||
# test merging webroot maps from the cli and a webroot map
|
||||
expected_map[u"eg2.com"] = u"/tmp2"
|
||||
expected_map["eg2.com"] = "/tmp2"
|
||||
domains = ["eg.com", "eg2.com"]
|
||||
self._webroot_map_test(simple_map, "/tmp2", "eg2.com,eg.com", expected_map, domains)
|
||||
|
||||
# test inclusion of interactively specified domains in the webroot map
|
||||
with mock.patch('letsencrypt.cli.display_ops.choose_names') as mock_choose:
|
||||
mock_choose.return_value = domains
|
||||
expected_map[u"eg2.com"] = u"/tmp"
|
||||
expected_map["eg2.com"] = "/tmp"
|
||||
self._webroot_map_test(None, "/tmp", None, expected_map, domains)
|
||||
|
||||
extra_args = ['-c', test_util.vector_path('webrootconftest.ini')]
|
||||
@@ -442,7 +442,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
||||
'{"eg.com.,www.eg.com": "/tmp", "eg.is.": "/tmp2"}']
|
||||
namespace = cli.prepare_and_parse_args(plugins, webroot_map_args)
|
||||
self.assertEqual(namespace.webroot_map,
|
||||
{u"eg.com": u"/tmp", u"www.eg.com": u"/tmp", u"eg.is": "/tmp2"})
|
||||
{"eg.com": "/tmp", "www.eg.com": "/tmp", "eg.is": "/tmp2"})
|
||||
|
||||
@mock.patch('letsencrypt.cli._suggest_donate')
|
||||
@mock.patch('letsencrypt.crypto_util.notAfter')
|
||||
|
||||
Reference in New Issue
Block a user