コード例 #1
0
ファイル: test_root.py プロジェクト: Janaba/adhocracy3
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'])
コード例 #2
0
ファイル: test_root.py プロジェクト: olivierh59500/adhocracy3
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'])
コード例 #3
0
ファイル: root.py プロジェクト: libscott/adhocracy3
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, {})
コード例 #4
0
ファイル: root.py プロジェクト: andantic/adhocracy3
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, {})
コード例 #5
0
ファイル: test_root.py プロジェクト: libscott/adhocracy3
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'])
コード例 #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)