Website: Fix tests.

master
Valentin Lorentz 2014-03-16 22:48:54 +00:00
parent 09c6903d18
commit 6f963e4d42
2 changed files with 10 additions and 9 deletions

View File

@ -64,7 +64,7 @@ class WebsiteCallback(httpserver.SupyHTTPServerCallback):
def query(path, args={}):
args = dict([(x,y) for x,y in args.items() if y is not None])
url = 'http://supybot.fr.cr/api%s?%s' % (path, urlencode(args))
url = 'http://supybot.aperio.fr/api%s?%s' % (path, urlencode(args))
data = utils.web.getUrl(url)
if sys.version_info[0] >= 3:
data = data.decode()
@ -113,7 +113,7 @@ class Website(callbacks.Plugin):
if irc.network == 'freenode':
assert channel in irc.state.channels
s = ('%s just pasted %s (type: %s): '
'http://supybot.fr.cr/paste/%s') % (
'http://supybot.aperio.fr/paste/%s') % (
bold(author),
bold(name),
bold(lexer),
@ -134,7 +134,7 @@ class Website(callbacks.Plugin):
return
irc.reply('%s %s' % (results['short_description'].replace('\r', '')
.replace('\n', ' '),
'http://supybot.fr.cr/plugins/view/%s/' % name))
'http://supybot.aperio.fr/plugins/view/%s/' % name))
plugin = wrap(plugin, ['something'])

View File

@ -33,12 +33,13 @@ from supybot.test import *
class WebsiteTestCase(PluginTestCase):
plugins = ('Website',)
def testPlugin(self):
self.assertError('plugin')
self.assertError('plugin Eeigrg')
self.assertResponse('plugin AttackProtector', 'This plugin aims to '
'provide a highly configurable protection against flood and '
'spam. http://supybot.fr.cr/plugins/view/AttackProtector/')
if network:
def testPlugin(self):
self.assertError('plugin')
self.assertError('plugin Eeigrg')
self.assertResponse('plugin AttackProtector', 'This plugin aims to '
'provide a highly configurable protection against flood and '
'spam. http://supybot.aperio.fr/plugins/view/AttackProtector/')
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: