OK, I shouldn't have used the word ugly, but I don't think you would disagree this makes it harder to maintain. In the situation where there are several mock.patch invocations this coding style becomes significantly harder to maintain.