Example #1
0
 def get(self):
     args = parser.parse_args()
     if not args.get('user_id'):
         raise BadRequest
     if len(args.get('user_id')) == 1:
         return get_recipes_for_user(args['user_id'][0])
     else:
         return get_recipes_for_users(args['user_id'])
Example #2
0
 def get(self):
     args = parser.parse_args()
     if not args.get('user_id'):
         raise BadRequest
     if len(args.get('user_id')) == 1:
         return get_recipes_for_user(args['user_id'][0])
     else:
         return get_recipes_for_users(args['user_id'])
Example #3
0
 def test_user_recipes(self):
     self.assertEqual(len(get_recipes_for_user(1)), 1)
Example #4
0
 def test_user_recipes(self):
     self.assertEqual(len(get_recipes_for_user(1)), 1)