Пример #1
0
 def test_8(self):
     actual = mmf._get_ingredient('      1    Egg yolk')
     self.assertEqual(actual.quantity, '1')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, 'Egg yolk')
     self.assertEqual(actual.is_heading, False)
Пример #2
0
 def test_6(self):
     actual = mmf._get_ingredient('    3/4 c  Long-grained rice')
     self.assertEqual(actual.quantity, '3/4')
     self.assertEqual(actual.unit, 'c')
     self.assertEqual(actual.text, 'Long-grained rice')
     self.assertEqual(actual.is_heading, False)
Пример #3
0
 def test_7(self):
     actual = mmf._get_ingredient('           Raisins (optional)')
     self.assertEqual(actual.quantity, '')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, 'Raisins (optional)')
     self.assertEqual(actual.is_heading, False)
Пример #4
0
 def test_when_whitespace(self):
     actual = mmf._get_ingredient('                   ')
     self.assertEqual(actual.quantity, '')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, '')
     self.assertEqual(actual.is_heading, False)
Пример #5
0
 def test_5(self):
     actual = mmf._get_ingredient('     .5 qt Milk')
     self.assertEqual(actual.quantity, '.5')
     self.assertEqual(actual.unit, 'qt')
     self.assertEqual(actual.text, 'Milk')
     self.assertEqual(actual.is_heading, False)
Пример #6
0
 def test_8(self):
     actual = mmf._get_ingredient('      1    Egg yolk')
     self.assertEqual(actual.quantity, '1')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, 'Egg yolk')
     self.assertEqual(actual.is_heading, False)
Пример #7
0
 def test_7(self):
     actual = mmf._get_ingredient('           Raisins (optional)')
     self.assertEqual(actual.quantity, '')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, 'Raisins (optional)')
     self.assertEqual(actual.is_heading, False)
Пример #8
0
 def test_6(self):
     actual = mmf._get_ingredient('    3/4 c  Long-grained rice')
     self.assertEqual(actual.quantity, '3/4')
     self.assertEqual(actual.unit, 'c')
     self.assertEqual(actual.text, 'Long-grained rice')
     self.assertEqual(actual.is_heading, False)
Пример #9
0
 def test_5(self):
     actual = mmf._get_ingredient('     .5 qt Milk')
     self.assertEqual(actual.quantity, '.5')
     self.assertEqual(actual.unit, 'qt')
     self.assertEqual(actual.text, 'Milk')
     self.assertEqual(actual.is_heading, False)
Пример #10
0
 def test_when_whitespace(self):
     actual = mmf._get_ingredient('                   ')
     self.assertEqual(actual.quantity, '')
     self.assertEqual(actual.unit, '')
     self.assertEqual(actual.text, '')
     self.assertEqual(actual.is_heading, False)