Adding test helper functions

I thought these two functions might help reduce duplication in our tests since we seem to be performing the same logic over and over again. This PR is just a RFC, so if it's something we want, I'll go ahead and update our tests to use it :smile: 
Should this name be changed too? It's also a `CheckXXX` func that throws a `t.Fatalf` not an `t.Errorf`