def test_define_keyboard(self): """ Test the dictionary with the word keyboard. """ res = commands.define("keyboard") assert isinstance(res, str) assert res == ("Wordnik says: A set of keys, as on a computer terminal, word processor, typewriter, or piano.")
def test_define_notaword(self): """ Test the dictionary with a nonsense word. """ res = commands.define("notaword") assert isinstance(res, str) assert res == "Wordnik does not have a definition for that."
def test_define_keyboard(self, needs_wordnik): """ Test the dictionary with the word keyboard. """ res = commands.define("keyboard") assert isinstance(res, str) assert res == ( "Wordnik says: A panel of buttons used for typing and performing " "other functions on a computer or typewriter.")
def test_define_irc(self): """ Test the dictionary with the word IRC. """ res = commands.define(" IRC \t") assert isinstance(res, str) assert res == ( "Wordnik says: An international computer network of " "Internet servers, using its own protocol through which " "individual users can hold real-time online conversations.")