Fix tests for factory methods.

Due to the way the factory tests were being set up, they were not being run properly. This pull request fixes that.

Because the gocheck context was being passed to the NewFactory method during test setup, assertions in factory methods were not being properly handled during actual tests. This resulted in some code being broken, but not immediately obviously so.
why did you change this.