RFE 871111 : Added test cases for --nokey option

This commit is contained in:
Kevin Murphy 2004-09-20 06:17:05 +00:00
parent 4b0ed27fef
commit 99c412940c

View File

@ -73,6 +73,13 @@ if sqlite:
self.assertResponse('test foo:bar', 'baz')
self.assertHelp('help test')
self.assertNotError('lookup remove test')
# Re-add the lookup, this time using the --nokey option
self.assertNotError('lookup add --nokey test foo.supyfact')
# And verify that the return of a random result does *not* include
# the key value, and that the value is at the beginning of the
# string
self.assertRegexp('test', r"^(bar|baz|my mom)")
self.assertNotError('lookup remove test')
try:
original = conf.supybot.reply.WhenNotCommand()
conf.supybot.reply.WhenNotCommand.setValue(True)