Added a test for the configurable.

This commit is contained in:
Jeremy Fincher 2003-11-17 06:29:13 +00:00
parent 6e1704a6dd
commit 7cbec39d55
5 changed files with 45 additions and 0 deletions

View File

@ -37,5 +37,11 @@ class BugzillaTest(PluginTestCase, PluginDocumentation):
self.assertNotError('bug gcc 5')
self.assertNotError('http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5')
def testConfigBugzillaSnarfer(self):
self.assertNotError('bugzilla config bug-snarfer off')
self.assertNoResponse('http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5')
self.assertNotError('bugzilla config bug-snarfer on')
self.assertNotError('http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:

View File

@ -62,4 +62,14 @@ class EbayTest(PluginTestCase, PluginDocumentation):
'ViewItem&item=2439393310&category=33708',
r'88-89 CRX amber')
def testConfigSnarfer(self):
self.assertNotError('ebay config auction-snarfer off')
self.assertNoResponse('http://cgi.ebay.com/ebaymotors/ws/'
'eBayISAPI.dll?ViewItem&item=2439393310&'
'category=33708')
self.assertNotError('ebay config auction-snarfer on')
self.assertNotError('http://cgi.ebay.com/ebaymotors/ws/'
'eBayISAPI.dll?ViewItem&item=2439393310&'
'category=33708')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:

View File

@ -55,6 +55,17 @@ class GameknotTestCase(PluginTestCase, PluginDocumentation):
self.assertRegexp('http://gameknot.com/stats.pl?ddipaolo&1',
r'^[^&]+$')
def testConfig(self):
self.assertNotError('gameknot config game-snarfer off')
self.assertNotError('gameknot config stats-snarfer off')
self.assertNoResponse('http://gameknot.com/stats.pl?ironchefchess')
self.assertNoResponse('http://gameknot.com/chess.pl?bd=907498')
self.assertNotError('gameknot config game-snarfer on')
self.assertNotError('gameknot config stats-snarfer on')
self.assertNotError('http://gameknot.com/stats.pl?ironchefchess')
self.assertNotError('http://gameknot.com/chess.pl?bd=907498')
def testSnarfer(self):
self.assertRegexp('http://gameknot.com/chess.pl?bd=907498',
'\x02ddipaolo\x0f won')

View File

@ -46,6 +46,16 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation):
'8bj.23%40gated-at.bofh.it&oe=UTF-8&output=gplain',
r'linux\.kernel.*NFS client freezes')
def testConfig(self):
self.assertNotError('google config groups-snarfer off')
self.assertNoResponse('http://groups.google.com/groups?dq=&hl=en&'
'lr=lang_en&ie=UTF-8&oe=UTF-8&selm=698f09f8.'
'0310132012.738e22fc%40posting.google.com')
self.assertNotError('google config groups-snarfer on')
self.assertNotError('http://groups.google.com/groups?dq=&hl=en&'
'lr=lang_en&ie=UTF-8&oe=UTF-8&selm=698f09f8.'
'0310132012.738e22fc%40posting.google.com')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:

View File

@ -62,6 +62,14 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
self.assertRegexp('http://aspn.activestate.com/ASPN/Cookbook/Python/'
'Recipe/230113',
'Implementation of sets using sorted lists')
def testConfig(self):
self.assertNotError('python config aspn-snarfer off')
self.assertNoResponse('http://aspn.activestate.com/ASPN/Cookbook/'
'Python/Recipe/230113')
self.assertNotError('python config aspn-snarfer on')
self.assertNotError('http://aspn.activestate.com/ASPN/Cookbook/'
'Python/Recipe/230113')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: