# 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):
# ${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