예제 #1
0
 def test_usage_message(self):
     """
     If a L{UsageError} is raised, the help screen is written to the output
     stream.
     """
     output = StringIO()
     main(["txaws-discover", "--help"], output, True)
     self.assertEqual(USAGE_MESSAGE, output.getvalue())
예제 #2
0
 def test_usage_message(self):
     """
     If a L{UsageError} is raised, the help screen is written to the output
     stream.
     """
     output = StringIO()
     main(["txaws-discover", "--help"], output, True)
     self.assertEqual(USAGE_MESSAGE, output.getvalue())
예제 #3
0
 def test_error_message(self):
     """
     If an exception is raised, its message is written to the output
     stream.
     """
     output = StringIO()
     main(["txaws-discover"], output, True)
     self.assertEqual(
         "ERROR: The '--key' command-line argument is required.\n",
         output.getvalue())
예제 #4
0
 def test_error_message(self):
     """
     If an exception is raised, its message is written to the output
     stream.
     """
     output = StringIO()
     main(["txaws-discover"], output, True)
     self.assertEqual(
         "ERROR: The '--key' command-line argument is required.\n",
         output.getvalue())