mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 00:35:03 +02:00
* 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:
@@ -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(
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user