mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
100% coverage is the goal, so add a test
This commit is contained in:
parent
368b69ff50
commit
0e18395a1b
1 changed files with 4 additions and 0 deletions
|
|
@ -98,6 +98,10 @@ class AlreadyListeningTest(unittest.TestCase):
|
|||
self.assertEqual(mock_get_utility.call_count, 1)
|
||||
mock_process.assert_called_once_with(4420)
|
||||
|
||||
@mock.patch("letsencrypt.plugins.util.psutil.net_connections")
|
||||
def test_access_denied_exception(self, mock_net):
|
||||
mock_net.side_effect = psutil.AccessDenied("")
|
||||
self.assertFalse(self._call(12345))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main() # pragma: no cover
|
||||
|
|
|
|||
Loading…
Reference in a new issue