diff --git a/plugins/Web/test.py b/plugins/Web/test.py index 9e6ff4f8a..3f99453fd 100644 --- a/plugins/Web/test.py +++ b/plugins/Web/test.py @@ -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)