Ejemplo n.º 1
0
 def test_definitely_has_food(self):
     hasFoodFOSHO = "FREE FOOD FOR ALL"
     ALSOHASFOOD = "I have pizza"
     foodPROVIDED = "Food will be provided"
     
     self.assertTrue(scanner(hasFoodFOSHO)[0])
     self.assertTrue(scanner(ALSOHASFOOD)[0])
     self.assertTrue(scanner(foodPROVIDED)[0])
Ejemplo n.º 2
0
 def test_real_messages_for_food(self):
     
     self.assertFalse(scanner(samples.BIG_STRING_1FINAL)[0])
     self.assertFalse(scanner(samples.BIG_STRING_2FINAL)[0])
Ejemplo n.º 3
0
 def test_empty_string(self):
     empty = ''
     self.assertEquals( scanner(empty), (False, "NO FOOD"))