Fix test setup to actually run an assertion for each generated query