Add test_query_constructor to test QueryGenerator's constructor

https://gerrit.wikimedia.org/r/#/c/129937/ must be merged first.

Change-Id: I0e1c461757a204e27b2e482707179b57771d625e
Merge "Add test_query_constructor to test QueryGenerator's constructor"