Beispiel #1
0
def configuration():
    test.setup()

    users_json_path = test.make_users_json([
        {
            'login': '******',
            'password': '******',
            'roles': ['role1'],
        },
        {
            'login': '******',
            'password': '******',
            'roles': ['role2'],
        },
    ])

    test.configure(f'''
        auth.providers+ {{
            type file
            path: {users_json_path!r}
        }}
        
        auth.methods+ {{
            type web
            secure False
            cookieName {COOKIE_NAME!r}
        }}
        
        auth.sessionLifeTime {SESSION_LIFETIME!r}

        api.actions [
            {{ type auth     access+ {{ type allow role all }} }}
            {{ type project  access+ {{ type allow role all }} }}
        ]
        
        projects [
            {{ uid ALL  access+ {{ type allow role all }} }}
            {{ uid one  access+ {{ type allow role role1 }} }}
            {{ uid two  access+ {{ type allow role role2 }} }}
        ]
    ''')

    yield

    test.teardown()
Beispiel #2
0
def configuration():
    test.setup()

    test.postgres_make_features(
        name='test1',
        geom_type='point',
        columns={
            'a': 'varchar',
            'i': 'int'
        },
        xy=[100, 500],
        crs='EPSG:3857',
        rows=10,
        cols=10,
        gap=100)

    yield

    test.postgres_drop_table('test1')
    test.teardown()
def configuration():
    test.setup()
    yield
    test.teardown()
def configuration():
    test.setup()
    test.web_server_create_wms(fixtures.WMS_CONFIG)
    yield
    test.teardown()