def test_sets_name(self): cmd = commands._find_command('foo-bar') # The name is preserved, so that 'crcache commands' shows something # sensible. self.assertEqual('foo-bar', cmd.name)
def test_sets_name(self): cmd = commands._find_command('foo') self.assertEqual('foo', cmd.name)
def test_looksupcommand(self): cmd = commands._find_command('foo-bar') self.assertIsInstance(cmd(None), commands.Command)
def test_missing_command(self): self.assertThat(lambda: commands._find_command('bar'), raises(KeyError))