Added unittests for queries
Added unittests for queries

Since the bug with list_csr_printable wasn't covered in
the existing tests, new ones have been added.

All credit goes to @Spindel

ModioAB/caramel,ModioAB/caramel