Probing gravity with weak lensing and clustering from mock galaxy surveys