mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-18 08:02:49 +01:00
Fix a test failure.
This commit is contained in:
parent
df14ebc0d2
commit
78685a323f
@ -67,11 +67,18 @@ class HttpTest(PluginTestCase):
|
||||
def testTitle(self):
|
||||
self.assertResponse('title http://www.slashdot.org/',
|
||||
'Slashdot: News for nerds, stuff that matters')
|
||||
self.assertNotRegexp('title '
|
||||
'http://www.amazon.com/exec/obidos/tg/detail/-/'
|
||||
'1884822312/qid=1063140754/sr=8-1/ref=sr_8_1/'
|
||||
'002-9802970-2308826?v=glance&s=books&n=507846',
|
||||
'no HTML title')
|
||||
# Amazon add a bunch of scripting stuff to the top of their page,
|
||||
# so we need to allow for a larger peekSize
|
||||
try:
|
||||
orig = conf.supybot.protocols.http.peekSize()
|
||||
conf.supybot.protocols.http.peekSize.setValue(8192)
|
||||
self.assertNotRegexp('title '
|
||||
'http://www.amazon.com/exec/obidos/tg/detail/-/'
|
||||
'1884822312/qid=1063140754/sr=8-1/ref=sr_8_1/'
|
||||
'002-9802970-2308826?v=glance&s=books&n=507846',
|
||||
'no HTML title')
|
||||
finally:
|
||||
conf.supybot.protocols.http.peekSize.setValue(orig)
|
||||
# Checks the non-greediness of the regexp
|
||||
self.assertResponse('title '
|
||||
'http://www.space.com/scienceastronomy/'
|
||||
|
Loading…
Reference in New Issue
Block a user