Skip to content

Commit

Permalink
Merge pull request #1059 from mrwacky42/add-tests
Browse files Browse the repository at this point in the history
Add  a test, skip a test
  • Loading branch information
pde committed Oct 21, 2015
2 parents 368b69f + 39a44b9 commit 3ea810d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions letsencrypt/plugins/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,7 @@ def _perform_single(self, achall):
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,
Expand Down
4 changes: 4 additions & 0 deletions letsencrypt/plugins/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ def test_listening_ipv6(self, mock_get_utility, mock_process, mock_net):
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

0 comments on commit 3ea810d

Please sign in to comment.