Ejemplo n.º 1
0
	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.")
Ejemplo n.º 2
0
	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."
Ejemplo n.º 3
0
	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."
Ejemplo n.º 4
0
	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.")
Ejemplo n.º 5
0
 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.")
Ejemplo n.º 6
0
	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.")
Ejemplo n.º 7
0
	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.")