Adding ```autospec=True``` to mock.patch did the trick here. Something to watch out for when mocking functions!!!