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')
def test_host_required(self): with output_to_string(): with args(): self.assertRaises(SystemExit, MockCommand)