Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 def test_no_command_provided_error(self):
     with capture() as (_, err):
         self.assertIn(
             str(CommandNotProvidedError(allowed=commands.keys())).lower(),
             err)
Example #4
0
 def test_no_command_provided_error(self):
     with capture() as (_, err):
         self.assertIn(str(CommandNotProvidedError(allowed=commands.keys())).lower(), err)