def METHOD_NAME(user):
    project = crud.create_project(DB, user, Project(project_id="my-project"))
    user2 = crud.create_user(DB, user=2)
    assert crud.count_users() == 2
    assert crud.count_projects() == 1
    assert crud.count_invitations() == 0
    # invite
    project.pending_invitations.append(user2)
    DB.session.commit()
    assert crud.count_invitations() == 1
    DB.session.delete(project)
    DB.session.commit()
    assert crud.count_projects() == 0
    assert crud.count_invitations() == 0