mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Web: Remove/update non-functional tests
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
5bb6fdcd52
commit
d73a801d8f
@ -49,28 +49,8 @@ class WebTestCase(ChannelPluginTestCase):
|
||||
self.assertNotError('size http://www.slashdot.org/')
|
||||
|
||||
def testTitle(self):
|
||||
self.assertResponse('title http://www.slashdot.org/',
|
||||
'Slashdot - News for nerds, stuff that matters')
|
||||
# Amazon add a bunch of scripting stuff to the top of their page,
|
||||
# so we need to allow for a larger peekSize
|
||||
# Actually, screw Amazon. Even bumping this up to 10k doesn't give us enough
|
||||
# info.
|
||||
# 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/'
|
||||
'jupiter_dark_spot_031023.html',
|
||||
'SPACE.com -- Mystery Spot on Jupiter Baffles '
|
||||
'Astronomers')
|
||||
self.assertRegexp('title http://www.slashdot.org/',
|
||||
'News for nerds, stuff that matters')
|
||||
# Checks for @title not-working correctly
|
||||
self.assertResponse('title '
|
||||
'http://www.catb.org/~esr/jargon/html/F/foo.html',
|
||||
@ -97,9 +77,8 @@ class WebTestCase(ChannelPluginTestCase):
|
||||
def testTitleSnarfer(self):
|
||||
try:
|
||||
conf.supybot.plugins.Web.titleSnarfer.setValue(True)
|
||||
self.assertSnarfResponse('http://microsoft.com/',
|
||||
'Title: Microsoft Corporation'
|
||||
' (at microsoft.com)')
|
||||
self.assertSnarfRegexp('http://microsoft.com/',
|
||||
'Title: Microsoft Corporation')
|
||||
finally:
|
||||
conf.supybot.plugins.Web.titleSnarfer.setValue(False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user