Mock integration

These are pretty minimal changes necessary for integration with an external mocking library, seriate.mock.