mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Merge pull request #1059 from mrwacky42/add-tests
Add a test, skip a test
This commit is contained in:
commit
3ea810d404
2 changed files with 5 additions and 4 deletions
|
|
@ -130,10 +130,7 @@ binary for temporary key/certificate generation.""".replace("\n", "")
|
|||
if self.conf("test-mode"):
|
||||
logger.debug("Test mode. Executing the manual command: %s", command)
|
||||
# sh shipped with OS X does't support echo -n
|
||||
if sys.platform == "darwin":
|
||||
executable = "/bin/bash"
|
||||
else:
|
||||
executable = None
|
||||
executable = "/bin/bash" if sys.platform == "darwin" else None
|
||||
try:
|
||||
self._httpd = subprocess.Popen(
|
||||
command,
|
||||
|
|
|
|||
|
|
@ -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