From ca3b4b82eded7c82072988f1a1fffb117af5bd4a Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 29 Sep 2024 14:34:48 -0500 Subject: [PATCH] Test additional parts of the sql.mak template --- tests/templates/test_templates.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/templates/test_templates.py b/tests/templates/test_templates.py index 6bfd916..315abd3 100644 --- a/tests/templates/test_templates.py +++ b/tests/templates/test_templates.py @@ -75,16 +75,29 @@ stock_template_args = { TEMPLATES = ['sql.mak', 'sql_edit.mak'] logged_in_args = pgwui_develop.testing.update_copy( stock_template_args, {'havecreds': True}) +multiline_sql_args = pgwui_develop.testing.update_copy( + logged_in_args, {'sql': '''select * from bar; +do $$ + begin + raise exception using message = 'some error'; + end; +$$; +select * from bar;''', + 'report_success': True, + 'upload_sql': False, + 'filename': ''}) # Add the request to all the arguments. # (The request won't deepcopy, so we don't try.) stock_template_args['request'] = request logged_in_args['request'] = request +multiline_sql_args['request'] = request # The variables with which to test each template TEMPLATE_ARGS = { 'sql.mak': [stock_template_args, - logged_in_args], + logged_in_args, + multiline_sql_args], 'sql_edit.mak': [stock_template_args, logged_in_args] } -- 2.34.1