mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Hopefully, this will fix the unicode issues we have with Amazon
This commit is contained in:
parent
eabb77abcf
commit
0349d11853
@ -120,7 +120,8 @@ class Amazon(callbacks.PrivmsgCommandAndRegexp):
|
||||
else:
|
||||
results['url'] = ' <%s>' % results['url']
|
||||
s = reply % results
|
||||
s.encode('utf-8')
|
||||
s = u'%s' % s
|
||||
s = s.encode('utf-8')
|
||||
res.append(str(s))
|
||||
except amazon.AmazonError, e:
|
||||
self.log.warning(str(e))
|
||||
|
@ -40,6 +40,9 @@ if LICENSE_KEY != 'INITIAL_NON_LICENSE_KEY' and network:
|
||||
PluginTestCase.setUp(self)
|
||||
conf.supybot.plugins.amazon.licensekey.set(LICENSE_KEY)
|
||||
|
||||
def testUnicode(self):
|
||||
self.assertNotError('artist husker du')
|
||||
|
||||
def testIsbn(self):
|
||||
self.assertHelp('isbn')
|
||||
self.assertRegexp('isbn 0738203793',
|
||||
|
Loading…
Reference in New Issue
Block a user