Merge pull request #913 from GLolol/dict/fix-changed-names

Dict: update hard-coded dictionary names since dict.org has changed them
This commit is contained in:
Valentin Lorentz 2014-11-24 07:35:56 +01:00
commit 283cdb3b1d
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')