From 99c412940cb96a6a8b117cff8ec9868e64ec8c2e Mon Sep 17 00:00:00 2001 From: Kevin Murphy Date: Mon, 20 Sep 2004 06:17:05 +0000 Subject: [PATCH] RFE 871111 : Added test cases for --nokey option --- test/test_Lookup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_Lookup.py b/test/test_Lookup.py index 5631fec74..716af8a3c 100644 --- a/test/test_Lookup.py +++ b/test/test_Lookup.py @@ -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)