Dict: update dictionary names since dict.org has changed them

This commit is contained in:
GLolol 2014-11-23 18:48:34 -08:00
parent 6483fa7a98
commit ceee0a64f7
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ class Dict(callbacks.Plugin):
def synonym(self, irc, msg, args, words): def synonym(self, irc, msg, args, words):
"""<word> [<word> ...] """<word> [<word> ...]
Gets a random synonym from the Moby Thesaurus (moby-thes) database. Gets a random synonym from the Moby Thesaurus (moby-thesaurus) database.
If given many words, gets a random synonym for each of them. If given many words, gets a random synonym for each of them.
@ -142,7 +142,7 @@ class Dict(callbacks.Plugin):
except socket.error as e: except socket.error as e:
irc.error(utils.web.strError(e), Raise=True) irc.error(utils.web.strError(e), Raise=True)
dictionary = 'moby-thes' dictionary = 'moby-thesaurus'
response = [] response = []
for word in words: for word in words:
definitions = conn.define(dictionary, word) definitions = conn.define(dictionary, word)

View File

@ -38,7 +38,7 @@ class DictTestCase(PluginTestCase):
self.assertNotError('dict flutter') self.assertNotError('dict flutter')
self.assertNotRegexp('dict web1913 slash', 'foldoc') self.assertNotRegexp('dict web1913 slash', 'foldoc')
self.assertError('dict ""') self.assertError('dict ""')
self.assertRegexp('dict eng-fra school', 'école') self.assertRegexp('dict fd-eng-fra school', 'école')
def testDictionaries(self): def testDictionaries(self):
self.assertNotError('dictionaries') self.assertNotError('dictionaries')