swapped mocks to be py3 compatible