def cropPhoto(): data = getData() token = request.form.get('token') img_url = request.form.get('url') x_start = request.form.get('xstart') y_start = request.form.get('ystart') x_end = request.form.get('xend') y_end = request.form.get('yend') user_profile_uploadphoto(data, token, img_url, x_start, y_start, x_end, y_end) return sendSuccess({})
def test_user_profile_setemail_invaild_token(): with pytest.raises(errors.ValueError): user_profile_uploadphoto(data, 'invaildToken', img_url, 600, 900, 100, 400)
def test_user_profile_uploadphoto_end_larger_02(): with pytest.raises(errors.ValueError): user_profile_uploadphoto(data, token, img_url, 600, 100, 900, 50)
def test_user_profile_uploadphoto_dimension_06(): with pytest.raises(errors.ValueError): user_profile_uploadphoto(data, token, img_url, 600, 100, 900, 40000)
def test_user_profile_uploadphoto_jpg(): with pytest.raises(errors.ValueError): user_profile_uploadphoto(data, token, img_url_not_jpg, 10, 10, 200, 200)
def test_user_profile_uploadphoto_http(): with pytest.raises(errors.ValueError): user_profile_uploadphoto(data, token, img_url_not_200, 600, 100, 900, 400)
def test_user_profile_uploadphoto_correct(): user_profile_uploadphoto(data, token, img_url, 600, 100, 900, 400)