100% coverage is the goal, so add a test

This commit is contained in:
Sharif Nassar 2015-10-20 22:35:03 -07:00
parent 368b69ff50
commit 0e18395a1b

View file

@ -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