diff --git a/plugins/Owner/test.py b/plugins/Owner/test.py index 92c28fad8..f453bd188 100644 --- a/plugins/Owner/test.py +++ b/plugins/Owner/test.py @@ -28,6 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. ### +from unittest import skip from supybot.test import * import supybot.conf as conf @@ -84,6 +85,16 @@ class OwnerTestCase(PluginTestCase): def testRename(self): self.assertError('rename Admin join JOIN') self.assertError('rename Admin join jo-in') + self.assertNotError('rename Admin join testcommand') + self.assertRegexp('list Admin', 'testcommand') + self.assertNotRegexp('list Admin', 'join') + self.assertError('help join') + self.assertRegexp('help testcommand', 'Tell the bot to join') + self.assertRegexp('join', 'not a valid command') + self.assertHelp('testcommand') + + @skip('Nested commands cannot be renamed yet.') + def testRenameNested(self): self.assertNotError('rename Admin "capability remove" rmcap') self.assertNotRegexp('list Admin', 'capability remove') self.assertRegexp('list Admin', 'rmcap')