Esempio n. 1
0
	def test_define_notaword(self):
		"""
		Test the dictionary with a nonsense word.
		"""
		res = commands.defit(c, e, "#test", "testrunner", "notaword")
		assert isinstance(res, unicode)
		assert res == "Wordnik does not have a definition for that."
Esempio n. 2
0
	def test_define_keyboard(self):
		"""
		Test the dictionary with the word keyboard.
		"""
		res = commands.defit(c, e, "#test", "testrunner", "keyboard")
		assert isinstance(res, unicode)
		assert res == ("Wordnik says: A set of keys, as on a computer "
			"terminal, word processor, typewriter, or piano.")
Esempio n. 3
0
	def test_define_irc(self):
		"""
		Test the dictionary with the word IRC.
		"""
		res = commands.defit(c, e, "#test", "testrunner", "  IRC \t")
		assert isinstance(res, unicode)
		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.")