def test_invalid_command_error(self): sys.argv.append('foobar') with capture() as (_, err): self.assertIn( str(CommandError(current='foobar', allowed=commands.keys())).lower(), err)
def test_invalid_command_error(self): sys.argv.append('foobar') with capture() as (_, err): self.assertIn(str(CommandError(current='foobar', allowed=commands.keys())).lower(), err)
def test_no_command_provided_error(self): with capture() as (_, err): self.assertIn( str(CommandNotProvidedError(allowed=commands.keys())).lower(), err)
def test_no_command_provided_error(self): with capture() as (_, err): self.assertIn(str(CommandNotProvidedError(allowed=commands.keys())).lower(), err)