Owner: Skip test of @rename for nested commands.

This commit is contained in:
Valentin Lorentz 2013-01-05 20:32:39 +01:00
parent f44e033827
commit b7b60630d8

View File

@ -28,6 +28,7 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
from unittest import skip
from supybot.test import * from supybot.test import *
import supybot.conf as conf import supybot.conf as conf
@ -84,6 +85,16 @@ class OwnerTestCase(PluginTestCase):
def testRename(self): def testRename(self):
self.assertError('rename Admin join JOIN') self.assertError('rename Admin join JOIN')
self.assertError('rename Admin join jo-in') 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.assertNotError('rename Admin "capability remove" rmcap')
self.assertNotRegexp('list Admin', 'capability remove') self.assertNotRegexp('list Admin', 'capability remove')
self.assertRegexp('list Admin', 'rmcap') self.assertRegexp('list Admin', 'rmcap')