~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
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):