←back to thread

67 points ingve | 1 comments | | HN request time: 0.201s | source
1. Izkata ◴[] No.45949860[source]
> In Why your mock doesn’t work I explained this rule of mocking:

> Mock where the object is used, not where it’s defined.

For anyone looking for generic advice, this is a quirk of python due to how imports work in that language (details in the linked post) and shouldn't be considered universal.