* tests: fix leaking patch in eff_test.py

* tests: PrintTest->NotifyTest in .display.util

The function was renamed during #8432. This change renames the test as
well.
This commit is contained in:
alexzorin
2020-11-10 14:42:51 -08:00
committed by GitHub
parent bf20f39ceb
commit db2ffea351
2 changed files with 6 additions and 7 deletions
+3 -3
View File
@@ -454,11 +454,11 @@ class PlaceParensTest(unittest.TestCase):
self.assertEqual("(y)es please", self._call("yes please"))
class PrintTest(unittest.TestCase):
"""Test the print function """
class NotifyTest(unittest.TestCase):
"""Test the notify function """
@test_util.patch_get_utility()
def test_print(self, mock_util):
def test_notify(self, mock_util):
from certbot.display.util import notify
notify("Hello World")
mock_util().notification.assert_called_with(
+3 -4
View File
@@ -122,10 +122,9 @@ class SubscribeTest(unittest.TestCase):
self.json = {'status': True}
self.response = mock.Mock(ok=True)
self.response.json.return_value = self.json
self.mock_notify = mock.patch("certbot._internal.eff.display_util.notify").start()
def tearDown(self):
self.mock_notify.stop()
patcher = mock.patch("certbot._internal.eff.display_util.notify")
self.mock_notify = patcher.start()
self.addCleanup(patcher.stop)
@mock.patch('certbot._internal.eff.requests.post')
def _call(self, mock_post):