~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Robert Collins
  • Date: 2007-04-20 05:44:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2441.
  • Revision ID: robertc@robertcollins.net-20070420054437-5txpyqld8y7cl3k5
Fix the ModuleHelpTopic get_help_topic to be tested with closer to real world data and strip the bzrlib.plugins. prefix from the name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
 
334
334
    def test_get_help_topic(self):
335
335
        """The help topic for a plugin is its module name."""
336
 
        mod = FakeModule('two lines of help\nand more', 'demo')
 
336
        mod = FakeModule('two lines of help\nand more', 'bzrlib.plugins.demo')
337
337
        topic = plugin.ModuleHelpTopic(mod)
338
338
        self.assertEqual('demo', topic.get_help_topic())
339
 
        mod = FakeModule('two lines of help\nand more', 'foo_bar')
 
339
        mod = FakeModule('two lines of help\nand more', 'bzrlib.plugins.foo_bar')
340
340
        topic = plugin.ModuleHelpTopic(mod)
341
341
        self.assertEqual('foo_bar', topic.get_help_topic())