Skip to content

Print format parameters on SQL validation file creation

Erwan Rouchet requested to merge sql-validation-print-params into master

Added while working on !1951 (merged).

When a developer first adds an assertExactQueries, the helper creates a .sql file with the current recorded queries. Developers will usually have to edit this file to replace UUIDs and any other fields that may change between tests to use string format parameters, and specify them with assertExactQueries('blah.sql', params={'a': 'b'}).

To help with this step, this prints the current parameters after creating the file. If a developer defines some parameters before the file is even created, then they can more easily see what each value in the generated file is.

Merge request reports

Loading