A few ORM instance-related test assertions

This is basically a rewrite of https://gist.github.com/zsiciarz/955100. Hope it's useful!