Пример #1
0
	def test_get_strings_total_sad(self):
		"""
		Tests a total sad and a delta happy
		"""
		sad = "Aww.  Twitter is sad =( You guys suck."
		a, b = happysad.get_strings(1, 0, 0, 1)
		self.assertEquals(a, sad)
		self.assertEquals(b, "Well, someone is being happy somewhere.  There's still hope")
Пример #2
0
	def test_get_strings_total_happy(self):
		"""
		Tests a total happy and a delta sad
		"""
		happy = "Yay! Twitter is happy!"
		a, b = happysad.get_strings(0, 1, 1, 0)
		self.assertEquals(a, happy)
		self.assertEquals(b, "But it's getting sadder.  Spread some love... call your Mom")
Пример #3
0
	def test_get_strings_both_sad(self):
		"""
		Tests a total sad and a delta sad
		"""
		sad = "Aww.  Twitter is sad =( You guys suck."
		a, b = happysad.get_strings(0, 1, 0, 1)
		self.assertEquals(a, sad)
		self.assertEquals(b, "Everyone is miserable.  World is ending.  Whatever")
Пример #4
0
	def test_get_strings_both_happy(self):
		"""
		Tests a total happy string and a delta happy
		DH, DS, TH, TS
		"""
		happy = "Yay! Twitter is happy!"
		a, b = happysad.get_strings(1, 0, 1, 0)
		self.assertEquals(a, happy)
		self.assertEquals(b, "...And it's getting happier!")