mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Web: Disable testWhitelist if --no-network is given.
This commit is contained in:
parent
290717fd46
commit
dbedcbb6c9
@ -94,14 +94,6 @@ class WebTestCase(ChannelPluginTestCase):
|
|||||||
finally:
|
finally:
|
||||||
conf.supybot.plugins.Web.nonSnarfingRegexp.setValue(snarf)
|
conf.supybot.plugins.Web.nonSnarfingRegexp.setValue(snarf)
|
||||||
|
|
||||||
def testNonSnarfingRegexpConfigurable(self):
|
|
||||||
self.assertSnarfNoResponse('http://foo.bar.baz/', 2)
|
|
||||||
try:
|
|
||||||
conf.supybot.plugins.Web.nonSnarfingRegexp.set('m/biff/')
|
|
||||||
self.assertSnarfNoResponse('http://biff.bar.baz/', 2)
|
|
||||||
finally:
|
|
||||||
conf.supybot.plugins.Web.nonSnarfingRegexp.set('')
|
|
||||||
|
|
||||||
def testWhitelist(self):
|
def testWhitelist(self):
|
||||||
fm = conf.supybot.plugins.Web.fetch.maximum()
|
fm = conf.supybot.plugins.Web.fetch.maximum()
|
||||||
uw = conf.supybot.plugins.Web.urlWhitelist()
|
uw = conf.supybot.plugins.Web.urlWhitelist()
|
||||||
@ -120,4 +112,13 @@ class WebTestCase(ChannelPluginTestCase):
|
|||||||
conf.supybot.plugins.Web.urlWhitelist.set('')
|
conf.supybot.plugins.Web.urlWhitelist.set('')
|
||||||
conf.supybot.plugins.Web.fetch.maximum.set(fm)
|
conf.supybot.plugins.Web.fetch.maximum.set(fm)
|
||||||
|
|
||||||
|
def testNonSnarfingRegexpConfigurable(self):
|
||||||
|
self.assertSnarfNoResponse('http://foo.bar.baz/', 2)
|
||||||
|
try:
|
||||||
|
conf.supybot.plugins.Web.nonSnarfingRegexp.set('m/biff/')
|
||||||
|
self.assertSnarfNoResponse('http://biff.bar.baz/', 2)
|
||||||
|
finally:
|
||||||
|
conf.supybot.plugins.Web.nonSnarfingRegexp.set('')
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
Loading…
Reference in New Issue
Block a user