Customize tests fixture name to confirm with template target name
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 23 Mar 2024 22:27:35 +0000 (17:27 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 23 Mar 2024 22:27:35 +0000 (17:27 -0500)
src/pgwui_develop/TEMPLATE/tests/views/test_TEMPLATE.py.mak

index ea99f123293f2fc959ec183d4aba69d5bc76b6c2..a1bfb8c57c9df3d3da6784cd0b0c32f7110836eb 100644 (file)
@@ -72,10 +72,10 @@ class MockUploadEngine():
 # Fixtures
 
 @pytest.fixture
-def isolate_upload_view(monkeypatch, pyramid_request_config):
+def isolate_${short_name}_view(monkeypatch, pyramid_request_config):
     '''Keep upload_view() from calling anything
 
-    Also, have isolate_upload_view(response)
+    Also, have isolate_${short_name}_view(response)
     cause UploadEngine to return the supplied "response".
     '''
     def run(response):
@@ -101,12 +101,12 @@ def isolate_upload_view(monkeypatch, pyramid_request_config):
 # ${short_name}_view()
 
 @pytest.fixture
-def return_log_tuples(isolate_upload_view, caplog):
+def return_log_tuples(isolate_${short_name}_view, caplog):
     '''Get result and the caplog.record_tuples from the upload_view() call'''
     caplog.set_level(logging.DEBUG)
 
     def run(response):
-        isolate_upload_view(response)
+        isolate_${short_name}_view(response)
         result = ${short_name}.${short_name}_view(get_current_request())
         del result['pgwui']  # Remove variables added by pgwui view decorators