예제 #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.")
예제 #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."
예제 #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."
예제 #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.")
예제 #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.")
예제 #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.")
예제 #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.")