Esempio n. 1
0
 def test_when_2(self):
     actual = mmf._is_ingredient('  1 1/2 c  Whipped cream')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 2
0
 def test_when_invalid_unit(self):
     actual = mmf._is_ingredient('        21 Apples')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 3
0
 def test_when_spacing_off(self):
     actual = mmf._is_ingredient('     1 qt Milk')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 4
0
 def test_when_direction(self):
     actual = mmf._is_ingredient('In large bowl, blend oil and sugars on low until well mixed. Add')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 5
0
 def test_when_invalid_quantity(self):
     actual = mmf._is_ingredient('     ab qt Milk')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 6
0
 def test_when_5(self):
     actual = mmf._is_ingredient('    1.5 qt Milk')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 7
0
 def test_when_direction(self):
     actual = mmf._is_ingredient(
         'In large bowl, blend oil and sugars on low until well mixed. Add')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 8
0
 def test_when_4(self):
     actual = mmf._is_ingredient('           Raisins (optional)')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 9
0
 def test_when_5(self):
     actual = mmf._is_ingredient('    1.5 qt Milk')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 10
0
 def test_when_2(self):
     actual = mmf._is_ingredient('  1 1/2 c  Whipped cream')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 11
0
 def test_when_3(self):
     actual = mmf._is_ingredient('      1    Vanilla bean')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 12
0
 def test_when_spacing_off(self):
     actual = mmf._is_ingredient('     1 qt Milk')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 13
0
 def test_when_invalid_unit(self):
     actual = mmf._is_ingredient('        21 Apples')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 14
0
 def test_when_invalid_quantity(self):
     actual = mmf._is_ingredient('     ab qt Milk')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 15
0
 def test_when_3(self):
     actual = mmf._is_ingredient('      1    Vanilla bean')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 16
0
 def test_when_6(self):
     actual = mmf._is_ingredient(
         '      1 c  Oil                                 1 t  Baking soda')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 17
0
 def test_when_4(self):
     actual = mmf._is_ingredient('           Raisins (optional)')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 18
0
 def test_when_empty(self):
     actual = mmf._is_ingredient('')
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 19
0
 def test_when_6(self):
     actual = mmf._is_ingredient('      1 c  Oil                                 1 t  Baking soda')
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 20
0
 def test_when_empty(self):
     actual = mmf._is_ingredient('')
     expected = False
     self.assertEqual(actual, expected)