Example #1
0
def test_add_example_process(pool_with_catalogs, registry):
    from adhocracy_core.resources.organisation import IOrganisation
    from adhocracy_core.resources.geo import add_locations_service
    from .root import add_example_process
    root = pool_with_catalogs
    add_locations_service(root, registry, {})
    add_example_process(root, registry, {})
    assert IOrganisation.providedBy(root['organisation'])
Example #2
0
def test_add_example_process(pool_with_catalogs, registry):
    from adhocracy_core.resources.organisation import IOrganisation
    from adhocracy_core.resources.geo import add_locations_service
    from .root import add_example_process
    root = pool_with_catalogs
    add_locations_service(root, registry, {})
    add_example_process(root, registry, {})
    assert IOrganisation.providedBy(root['organisation'])
Example #3
0
def create_initial_content_for_app_root(context: IPool, registry: Registry,
                                        options: dict):
    """Add the Catalog, principals services to the context."""
    _add_objectmap_to_app_root(context)
    _add_graph(context, registry)
    _add_catalog_service(context, registry)
    _add_principals_service(context, registry)
    _add_acl_to_app_root(context, registry)
    _add_default_group(context, registry)
    _add_initial_user_and_group(context, registry)
    add_locations_service(context, registry, {})
Example #4
0
def create_initial_content_for_app_root(context: IPool, registry: Registry,
                                        options: dict):
    """Add the Catalog, principals services to the context."""
    _add_objectmap_to_app_root(context)
    _add_graph(context, registry)
    _add_catalog_service(context, registry)
    _add_principals_service(context, registry)
    _add_acl_to_app_root(context, registry)
    _add_default_group(context, registry)
    _add_initial_user_and_group(context, registry)
    add_locations_service(context, registry, {})
Example #5
0
def test_add_example_process(pool_with_catalogs, registry):
    from adhocracy_core.utils import get_sheet_field
    from adhocracy_core.resources.organisation import IOrganisation
    from adhocracy_core.resources.geo import IMultiPolygon
    from adhocracy_core.resources.geo import add_locations_service
    import adhocracy_core.sheets.geo
    from adhocracy_meinberlin import resources
    from .root import add_example_process
    root = pool_with_catalogs
    add_locations_service(root, registry, {})
    add_example_process(root, registry, {})
    assert IOrganisation.providedBy(root['organisation'])
Example #6
0
def test_add_example_process(pool_with_catalogs, registry):
    from adhocracy_core.utils import get_sheet_field
    from adhocracy_core.resources.organisation import IOrganisation
    from adhocracy_core.resources.geo import IMultiPolygon
    from adhocracy_core.resources.geo import add_locations_service
    import adhocracy_core.sheets.geo
    from adhocracy_meinberlin import resources
    from .root import add_example_process
    root = pool_with_catalogs
    add_locations_service(root, registry, {})
    add_example_process(root, registry, {})
    assert IOrganisation.providedBy(root['organisation'])
    kiezkasse =  root['organisation']['kiezkasse']
    assert resources.kiezkassen.IProcess.providedBy(kiezkasse)
    kiezregion = get_sheet_field(kiezkasse,
                                 adhocracy_core.sheets.geo.ILocationReference,
                                 'location'
                                 )
    assert IMultiPolygon.providedBy(kiezregion)
    bplan =  root['organisation']['bplan']
    assert resources.bplan.IProcess.providedBy(bplan)