cli: miscellaneous IReporter removals (#8436)

* certbot delete: use undecorated print

* certbot revoke: use undecorated print

* certbot revoke: remove ireporter usages

* eff: remove IReporter usages

* certbot unregister: remove IReporter usage

* certbot update_account: remove IReporter usages

* certbot run: remove IReporter in duplicate prompt

* fix test_revoke_multiple_lineages
This commit is contained in:
alexzorin
2020-11-09 15:31:27 -08:00
committed by GitHub
parent 11a4882128
commit bf20f39ceb
9 changed files with 59 additions and 63 deletions
+5 -7
View File
@@ -384,16 +384,14 @@ class SuccessRevocationTest(unittest.TestCase):
success_revocation(path)
@test_util.patch_get_utility("certbot.display.ops.z_util")
def test_success_revocation(self, mock_util):
mock_util().notification.return_value = None
@mock.patch("certbot.display.util.notify")
def test_success_revocation(self, mock_notify, unused_mock_util):
path = "/path/to/cert.pem"
self._call(path)
mock_util().notification.assert_called_once_with(
mock_notify.assert_called_once_with(
"Congratulations! You have successfully revoked the certificate "
"that was located at {0}{1}{1}".format(
path,
os.linesep), pause=False)
self.assertTrue(path in mock_util().notification.call_args[0][0])
"that was located at {0}.".format(path)
)
class ValidatorTests(unittest.TestCase):