Exemple #1
0
def test_delete_point_cloud(projects_fixture):
    u1 = db_session.query(User).get(1)

    point_cloud = PointCloudService.create(projectId=projects_fixture.id,
                                           data=POINT_CLOUD_DATA,
                                           user=u1)
    PointCloudService.delete(pointCloudId=point_cloud.id)
    assert db_session.query(PointCloud).count() == 0
    assert db_session.query(Feature).count() == 0
    assert len(os.listdir(get_project_asset_dir(point_cloud.project_id))) == 0
Exemple #2
0
def test_add_point_cloud(projects_fixture):
    u1 = db_session.query(User).get(1)

    point_cloud = PointCloudService.create(projectId=projects_fixture.id,
                                           data=POINT_CLOUD_DATA,
                                           user=u1)
    assert point_cloud.description == "description"
    assert point_cloud.conversion_parameters == "--scale 2.0"
    assert not point_cloud.feature
    assert point_cloud.project_id == projects_fixture.id
    assert db_session.query(PointCloud).count() == 1
Exemple #3
0
 def post(self, projectId: int):
     logger.info("Add point cloud to project:{} for user:{}".format(
         projectId, request.current_user.username))
     return PointCloudService.create(projectId=projectId,
                                     user=request.current_user,
                                     data=api.payload)
Exemple #4
0
def point_cloud_fixture():
    u1 = db_session.query(User).filter(User.username == "test1").first()
    data = {"description": "description"}
    point_cloud = PointCloudService.create(projectId=1, data=data, user=u1)
    yield point_cloud