Example #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())
Example #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())
Example #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())
Example #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())