def test_create_ingredient_with_invalid_details_invalid(self):
    'Test that ingredients is not created with invalid details'
    payload = {'name': ''}
    res = self.client.post(INGREDIENTS_URL, payload)
    self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
Test that ingredients is not created with invalid details
def test_create_ingredient_with_invalid_details_invalid(self):
    
    payload = {'name': }
    res = self.client.post(INGREDIENTS_URL, payload)
    self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)