def registry_contextual_model_many2one(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], funct_contextual_model_many2one, multipk=request.param) request.addfinalizer(registry.close) return registry
def registry_contextual_default_model(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], funct_contextual_model, ColumnType=request.param[0], **request.param[1]) request.addfinalizer(registry.close) return registry
def registry_core_view(request, bloks_loaded): reset_db() registry = init_registry_with_bloks(['furetui'], simple_view) request.addfinalizer(registry.close) registry.T1.insert(code='test1', val=1) registry.T2.insert(code='test1', val=2) registry.T1.insert(code='test2', val=3) registry.T2.insert(code='test2', val=4) return registry
def registry_contextual_model(request, bloks_loaded, column_definition): # noqa F811 reset_db() column, value1, value2, value3, kwargs = column_definition registry = init_registry_with_bloks(["furetui"], funct_contextual_model, ColumnType=column, **kwargs) request.addfinalizer(registry.close) return registry
def registry_context_with_furetui(request, webserver, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], add_context_with_furetui) registry.Test.insert(code='test') webserver.post_json('/furet-ui/login', { 'login': '******', 'password': '******' }, status=200) def logout(): webserver.post_json('/furet-ui/logout', status=200) registry.close() request.addfinalizer(logout) return registry
def registry_call_method(request, webserver, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui", "furetui-auth"], _with_call_method, **request.param) registry.Pyramid.User.insert(login='******') registry.Pyramid.CredentialStore.insert(login='******', password='******') webserver.post_json('/furet-ui/login', { 'login': '******', 'password': '******' }, status=200) def logout(): webserver.post_json('/furet-ui/logout', status=200) registry.close() request.addfinalizer(logout) return registry
def registry_context_with_furetui_and_auth(request, webserver, bloks_loaded): reset_db() registry = init_registry_with_bloks(["furetui", "furetui-auth"], add_context) registry.Pyramid.User.insert(login='******', lang=request.param) registry.Pyramid.CredentialStore.insert(login='******', password='******') registry.Test.insert(code='test') webserver.post_json('/furet-ui/login', { 'login': '******', 'password': '******' }, status=200) def logout(): webserver.post_json('/furet-ui/logout', status=200) registry.close() request.addfinalizer(logout) return registry
def registry_one2many(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], request.param) request.addfinalizer(registry.close) return registry
def registry_simple_model(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], simple_model) request.addfinalizer(registry.close) return registry
def registry_contextual_model_fallback(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], funct_contextual_model_fallback) request.addfinalizer(registry.close) return registry
def registry_core(request, bloks_loaded): # noqa F811 reset_db() registry = init_registry_with_bloks(["furetui"], request.param['funct']) request.addfinalizer(registry.close) return registry, request.param