Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsirisInferi <github@flut.demon.nl>2020-02-06 23:24:25 +0300
committerOsirisInferi <github@flut.demon.nl>2020-02-06 23:24:25 +0300
commit4f80f8b910b0446eda6c4224c5855e0653dec274 (patch)
tree5a5fcb109c5fdec52d9835dcb301e30426b21600
parent0e03f827339dd3f6261b985f92b4b5ec6c6164d8 (diff)
Fixing existing tests
-rw-r--r--certbot-nginx/tests/configurator_test.py4
-rw-r--r--certbot-nginx/tests/parser_test.py7
2 files changed, 6 insertions, 5 deletions
diff --git a/certbot-nginx/tests/configurator_test.py b/certbot-nginx/tests/configurator_test.py
index 57097859a..0d9d6d356 100644
--- a/certbot-nginx/tests/configurator_test.py
+++ b/certbot-nginx/tests/configurator_test.py
@@ -36,7 +36,7 @@ class NginxConfiguratorTest(util.NginxTest):
def test_prepare(self):
self.assertEqual((1, 6, 2), self.config.version)
- self.assertEqual(11, len(self.config.parser.parsed))
+ self.assertEqual(12, len(self.config.parser.parsed))
@mock.patch("certbot_nginx._internal.configurator.util.exe_exists")
@mock.patch("certbot_nginx._internal.configurator.subprocess.Popen")
@@ -926,7 +926,7 @@ class NginxConfiguratorTest(util.NginxTest):
prefer_ssl=False,
no_ssl_filter_port='80')
# Check that the dialog was called with only port 80 vhosts
- self.assertEqual(len(mock_select_vhs.call_args[0][0]), 5)
+ self.assertEqual(len(mock_select_vhs.call_args[0][0]), 6)
class InstallSslOptionsConfTest(util.NginxTest):
diff --git a/certbot-nginx/tests/parser_test.py b/certbot-nginx/tests/parser_test.py
index 2f3b260ca..f3a5665c5 100644
--- a/certbot-nginx/tests/parser_test.py
+++ b/certbot-nginx/tests/parser_test.py
@@ -58,7 +58,8 @@ class NginxParserTest(util.NginxTest):
'sites-enabled/sslon.com',
'sites-enabled/globalssl.com',
'sites-enabled/ipv6.com',
- 'sites-enabled/ipv6ssl.com']},
+ 'sites-enabled/ipv6ssl.com',
+ 'sites-enabled/example.net']},
set(nparser.parsed.keys()))
self.assertEqual([['server_name', 'somename', 'alias', 'another.alias']],
nparser.parsed[nparser.abs_path('server.conf')])
@@ -88,7 +89,7 @@ class NginxParserTest(util.NginxTest):
parsed = nparser._parse_files(nparser.abs_path(
'sites-enabled/example.com.test'))
self.assertEqual(3, len(glob.glob(nparser.abs_path('*.test'))))
- self.assertEqual(8, len(
+ self.assertEqual(9, len(
glob.glob(nparser.abs_path('sites-enabled/*.test'))))
self.assertEqual([[['server'], [['listen', '69.50.225.155:9000'],
['listen', '127.0.0.1'],
@@ -171,7 +172,7 @@ class NginxParserTest(util.NginxTest):
'*.www.example.com']),
[], [2, 1, 0])
- self.assertEqual(13, len(vhosts))
+ self.assertEqual(14, len(vhosts))
example_com = [x for x in vhosts if 'example.com' in x.filep][0]
self.assertEqual(vhost3, example_com)
default = [x for x in vhosts if 'default' in x.filep][0]