diff options
author | Filip Lajszczak <filip.lajszczak@gmail.com> | 2020-02-06 18:14:17 +0300 |
---|---|---|
committer | Filip Lajszczak <filip.lajszczak@gmail.com> | 2020-02-06 18:14:17 +0300 |
commit | 2b051dd197804b5c93b6e38aae91c991278afdba (patch) | |
tree | e2872c7a8e89f03e0e4675e2d217c595d50a768c /certbot-nginx/certbot_nginx/tests/display_ops_test.py | |
parent | b27e5804b9671e28f37a6da7e2f1f7fa9455d24a (diff) | |
parent | 7da5196206b33d5593bd15cd1dcce4d790db7e6d (diff) |
Merge branch 'master' of https://github.com/certbot/certbot
Diffstat (limited to 'certbot-nginx/certbot_nginx/tests/display_ops_test.py')
-rw-r--r-- | certbot-nginx/certbot_nginx/tests/display_ops_test.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/certbot-nginx/certbot_nginx/tests/display_ops_test.py b/certbot-nginx/certbot_nginx/tests/display_ops_test.py deleted file mode 100644 index e3c6fb66b..000000000 --- a/certbot-nginx/certbot_nginx/tests/display_ops_test.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Test certbot_apache.display_ops.""" -import unittest - -from certbot.display import util as display_util - -from certbot.tests import util as certbot_util - -from certbot_nginx import parser - -from certbot_nginx.display_ops import select_vhost_multiple -from certbot_nginx.tests import util - - -class SelectVhostMultiTest(util.NginxTest): - """Tests for certbot_nginx.display_ops.select_vhost_multiple.""" - - def setUp(self): - super(SelectVhostMultiTest, self).setUp() - nparser = parser.NginxParser(self.config_path) - self.vhosts = nparser.get_vhosts() - - def test_select_no_input(self): - self.assertFalse(select_vhost_multiple([])) - - @certbot_util.patch_get_utility() - def test_select_correct(self, mock_util): - mock_util().checklist.return_value = ( - display_util.OK, [self.vhosts[3].display_repr(), - self.vhosts[2].display_repr()]) - vhs = select_vhost_multiple([self.vhosts[3], - self.vhosts[2], - self.vhosts[1]]) - self.assertTrue(self.vhosts[2] in vhs) - self.assertTrue(self.vhosts[3] in vhs) - self.assertFalse(self.vhosts[1] in vhs) - - @certbot_util.patch_get_utility() - def test_select_cancel(self, mock_util): - mock_util().checklist.return_value = (display_util.CANCEL, "whatever") - vhs = select_vhost_multiple([self.vhosts[2], self.vhosts[3]]) - self.assertFalse(vhs) - - -if __name__ == "__main__": - unittest.main() # pragma: no cover |