Mocking and Unittesting in Python