Quote: add tests for 'replace'

This commit is contained in:
GLolol 2014-12-26 17:18:08 -05:00 committed by James Lu
parent 93d94067d0
commit 53792fbe6c
1 changed files with 9 additions and 2 deletions

View File

@ -29,8 +29,15 @@
from supybot.test import *
class QuoteTestCase(PluginTestCase):
plugins = ('Quote',)
class QuoteTestCase(ChannelPluginTestCase):
plugins = ('Quote', 'User')
def testReplace(self):
self.feedMsg('register testuser moo', to=self.nick, frm=self.prefix)
_ = self.getMsg(' ')
self.assertNotError("quote add hello")
self.assertNotError("quote replace 1 goodbye")
self.assertRegexp("quote get 1", "goodbye")
self.assertError("quote replace 5 afsdafas") # non-existant
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: