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, )
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, )
def svc(pyramid_request, db_session): return GroupListService( session=db_session, default_authority=pyramid_request.default_authority)