Adding testing. Whooo?
Some horrible multiply nested list-comprehensions to generate the equivalent return value of the DB query so I can verify it returned the correct value.