~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        self.assertContainsRe(c.get_help_text(), '--foo')
92
92
 
93
93
 
 
94
class TestInvokedAs(tests.TestCase):
 
95
 
 
96
    def test_invoked_as(self):
 
97
        """The command object knows the actual name used to invoke it."""
 
98
        commands.install_bzr_command_hooks()
 
99
        commands._register_builtin_commands()
 
100
        # get one from the real get_cmd_object.
 
101
        c = commands.get_cmd_object('ci')
 
102
        self.assertIsInstance(c, builtins.cmd_commit)
 
103
        self.assertEquals(c.invoked_as, 'ci')
 
104
 
 
105
 
94
106
class TestGetAlias(tests.TestCase):
95
107
 
96
108
    def _get_config(self, config_text):