Move test_add_chal from letsencrypt_nginx (plugins.common 100% coverage).

This commit is contained in:
Jakub Warmuz 2015-06-28 09:39:21 +00:00
parent 46707406b5
commit 051a351a43
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
2 changed files with 5 additions and 5 deletions

View file

@ -140,6 +140,11 @@ class DvsniTest(unittest.TestCase):
from letsencrypt.plugins.common import Dvsni
self.sni = Dvsni(configurator=mock.MagicMock())
def test_add_chall(self):
self.sni.add_chall(self.achalls[0], 0)
self.assertEqual(1, len(self.sni.achalls))
self.assertEqual([0], self.sni.indices)
def test_setup_challenge_cert(self):
# This is a helper function that can be used for handling
# open context managers more elegantly. It avoids dealing with

View file

@ -61,11 +61,6 @@ class DvsniPerformTest(util.NginxTest):
shutil.rmtree(self.config_dir)
shutil.rmtree(self.work_dir)
def test_add_chall(self):
self.sni.add_chall(self.achalls[0], 0)
self.assertEqual(1, len(self.sni.achalls))
self.assertEqual([0], self.sni.indices)
@mock.patch("letsencrypt_nginx.configurator"
".NginxConfigurator.choose_vhost")
def test_perform(self, mock_choose):