def test_invalid_file_arg(self):
     command = CatCertCommand()
     try:
         command.main(["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))
예제 #2
0
 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_file_arg_required(self):
     command = CatCertCommand()
     try:
         command.main([])
         self.fail("Expected InvalidCLIOptionError since no file arg.")
     except InvalidCLIOptionError, e:
         self.assertEqual("You must specify a certificate file.",
                          str(e))
예제 #4
0
 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 __init__(self, cert_pem):
     CatCertCommand.__init__(self)
     self.cert = create_from_pem(cert_pem)
예제 #6
0
 def __init__(self, cert_pem):
     CatCertCommand.__init__(self)
     self.cert = create_from_pem(cert_pem)