Plugin: Fix failures in testPlugin

The tests were running into the ambiguity between nested commands and commands
with the same name as their plugin, so "plugin plugin" is treated as
specifying the plugin command from the plugin plugin.  This leads to it
displaying the help, since an argument is expected.

Since the Utilities plugin is already loaded by the test suite, use a command
from it as the argument to the plugin command.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2012-09-05 21:50:42 -04:00
parent 124361d76d
commit b7efbf409c
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ from supybot.test import *
class PluginTestCase(PluginTestCase):
plugins = ('Plugin', 'Utilities')
def testPlugin(self):
self.assertRegexp('plugin plugin', 'available.*Plugin plugin')
self.assertResponse('echo [plugin plugin]', 'Plugin')
self.assertRegexp('plugin ignore', 'available.*Utilities plugin')
self.assertResponse('echo [plugin ignore]', 'Utilities')
def testList(self):
self.assertRegexp('plugin list', 'Plugin.*Utilities')