Example #1
0
 def test_common_options_works_with_all_required_args(self):
     with output_to_string():
         with args('--host=foo'):
             try:
                 MockCommand().run()
             except SystemExit:
                 self.fail('Should not have exited with all required args')
Example #2
0
 def test_common_options_works_with_all_required_args(self):
     with output_to_string():
         with args('--host=foo'):
             try:
                 MockCommand().run()
             except SystemExit:
                 self.fail('Should not have exited with all required args')
Example #3
0
 def test_host_required(self):
     with output_to_string():
         with args():
             self.assertRaises(SystemExit, MockCommand)
Example #4
0
 def test_host_required(self):
     with output_to_string():
         with args():
             self.assertRaises(SystemExit, MockCommand)