MoobotFactoids: Fix Python 3.2 support.

This commit is contained in:
Valentin Lorentz 2015-08-10 19:02:50 +02:00
parent be6bc1a734
commit 8ad16701ce

View File

@ -33,6 +33,7 @@ import time
from supybot.test import * from supybot.test import *
#import supybot.plugin as plugin #import supybot.plugin as plugin
import supybot.ircutils as ircutils import supybot.ircutils as ircutils
from supybot.minisix import u
try: try:
import sqlite import sqlite
@ -267,10 +268,11 @@ class FactoidsTestCase(ChannelPluginTestCase):
'Key search for "foo" ' 'Key search for "foo" '
'(2 found): "foo" and "foo\'"') '(2 found): "foo" and "foo\'"')
# Check unicode stuff # Check unicode stuff
self.assertResponse(u'listkeys Б', 'No keys matching "Б" found.') self.assertResponse(u('listkeys Б'),
self.assertNotError(u'АБВГДЕЖ is foo') 'No keys matching "Б" found.')
self.assertNotError(u'АБВГДЕЖЗИ is foo') self.assertNotError(u('АБВГДЕЖ is foo'))
self.assertResponse(u'listkeys Б', self.assertNotError(u('АБВГДЕЖЗИ is foo'))
self.assertResponse(u('listkeys Б'),
'Key search for "Б" ' 'Key search for "Б" '
'(2 found): "АБВГДЕЖ" and "АБВГДЕЖЗИ"') '(2 found): "АБВГДЕЖ" and "АБВГДЕЖЗИ"')
finally: finally: