From af650011eea8c6af9369b389e2c2b9047ab3a6c5 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 2 Jan 2021 16:21:03 -0600 Subject: [PATCH] Fix missing substitions --- .../TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak | 2 +- src/pgwui_testing/TEMPLATE/tests/views/test_TEMPLATE.py.mak | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pgwui_testing/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak b/src/pgwui_testing/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak index c7b73c4..1e58a8d 100644 --- a/src/pgwui_testing/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak +++ b/src/pgwui_testing/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak @@ -32,7 +32,7 @@ log = logging.getLogger(__name__) @view_config(route_name='${component.lower()}', renderer='${component.lower()}:templates/${short_name}.mak') @auth_base_view -def upload_view(request): +def ${short_name}_view(request): response = UploadEngine(YOURUploadHandler(request)).run() diff --git a/src/pgwui_testing/TEMPLATE/tests/views/test_TEMPLATE.py.mak b/src/pgwui_testing/TEMPLATE/tests/views/test_TEMPLATE.py.mak index 13ec1af..3cb0270 100644 --- a/src/pgwui_testing/TEMPLATE/tests/views/test_TEMPLATE.py.mak +++ b/src/pgwui_testing/TEMPLATE/tests/views/test_TEMPLATE.py.mak @@ -26,7 +26,7 @@ from pyramid.threadlocal import get_current_request, get_current_registry from pgwui_common.__init__ import includeme as pgwui_common_includeme from pgwui_core import constants from pgwui_upload.__init__ import includeme as pgwui_upload_includeme -from pgwui_upload.views import upload +from ${component.lower()}.views import ${short_name} # Activiate our pytest plugin pytest_plugins = ("pgwui",) @@ -59,7 +59,7 @@ def return_log_tuples(isolate_upload_view, caplog): def run(response): isolate_upload_view(response) - result = upload.upload_view(get_current_request()) + result = ${short_name}.${short_name}_view(get_current_request()) del result['pgwui'] # Remove variables added by pgwui view decorators return (result, caplog.record_tuples) -- 2.34.1