def test_invalid_file_arg(self): command = CatCertCommand() try: command.run(["this_file_does_not_exist.crt"]) self.fail("Expected InvalidCLIOptionError since no file does not exist.") except InvalidCLIOptionError, e: self.assertEqual("The specified certificate file does not exist.", str(e))
def test_file_arg_required(self): command = CatCertCommand() try: command.run([]) self.fail("Expected InvalidCLIOptionError since no file arg.") except InvalidCLIOptionError, e: self.assertEqual("You must specify a certificate file.", str(e))
def test_invalid_file_arg(self): command = CatCertCommand() try: command.run(["this_file_does_not_exist.crt"]) self.fail( "Expected InvalidCLIOptionError since no file does not exist.") except InvalidCLIOptionError, e: self.assertEqual("The specified certificate file does not exist.", str(e))