Skip to content

Commit

Permalink
Adding testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNavigat committed Jun 6, 2016
1 parent 928ea2f commit 111ca65
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions certbot/tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,15 @@ def test_handle_exception(self, mock_sys):
mock_sys.exit.assert_called_with(''.join(
traceback.format_exception_only(KeyboardInterrupt, interrupt)))

# Test dialog errors

import dialog
exception = dialog.error(message="test message")
main._handle_exception(
dialog.DialogError, exc_value=exception, trace=None, config=None)
error_msg = mock_sys.exit.call_args_list[-1][0][0]
self.assertTrue("test message" in error_msg)

def test_read_file(self):
rel_test_path = os.path.relpath(os.path.join(self.tmp_dir, 'foo'))
self.assertRaises(
Expand Down

0 comments on commit 111ca65

Please sign in to comment.