Test actually works now :)

This commit is contained in:
Peter Eckersley
2015-10-16 18:28:38 -07:00
parent 36432e35f7
commit 57e15c52d7
+5 -9
View File
@@ -97,15 +97,11 @@ class CLITest(unittest.TestCase):
output = StringIO.StringIO()
plugins = disco.PluginsRegistry.find_all()
if "apache" in plugins:
with mock.patch('letsencrypt.cli.sys.stdout', new=output):
self.assertRaises(SystemExit, self._call_stdout,
['--agree-eula', '--apache', '--authenticator', 'standalone'])
#import sys
#sys.stderr.write(repr(self._call_stdout(['--agree-eula', '--apache', '--authenticator', 'standalone'])))
out = output.getvalue()
self.assertTrue("Too many flags setting" in out)
# TODO add tests with a broken plugin, a missing plugin, etc
from letsencrypt import cli
args = ['--agree-eula', '--apache', '--authenticator', 'standalone']
ret, _, _, _ = self._call(args)
self.assertTrue("Too many flags setting" in ret)
# TODO add tests with a broken plugin, a missing plugin, etc
def test_rollback(self):
_, _, _, client = self._call(['rollback'])