It’s not really that different from like
my_get_mock = Mock(side_effect=Some exception("oh no"))
result = some_func(http_getter=my_get_mock)
There’s many ways of writing bad code and tests, but mocks and patches aren’t always a bad tool. But sure, you can definitely fuck things up with them.






I don’t think that’s always true. Some people develop a drug addiction and then that leads to homelessness. Spend increasing amounts of time and money on drugs instead of life needs, and then they’re broke jobless and out of options.
Someone who’s homeless may use drugs and develop an addiction, too. But the order of events isn’t fixed. I don’t know how common either order is.