Exemplo n.º 1
0
def svc_no_sample_groups(pyramid_request, pyramid_config, db_session):
    # The way that the group_scope_service is mocked in the main `svc`
    # fixture brings `sample_groups` into the DB. For a clean service with
    # no groups in the DB...here we go
    group_scope_svc = mock.create_autospec(GroupScopeService,
                                           spec_set=True,
                                           instance=True)
    pyramid_config.register_service(group_scope_svc, name="group_scope")
    return GroupListService(
        session=db_session,
        default_authority=pyramid_request.default_authority,
        group_scope_service=group_scope_svc,
    )
Exemplo n.º 2
0
def svc(pyramid_request, db_session, group_scope_service):
    return GroupListService(
        session=db_session,
        default_authority=pyramid_request.default_authority,
        group_scope_service=group_scope_service,
    )
Exemplo n.º 3
0
def svc(pyramid_request, db_session):
    return GroupListService(
        session=db_session,
        default_authority=pyramid_request.default_authority)