Closed GoogleCodeExporter closed 8 years ago
typo in title: Patching doesnt work if methods are imported from module
Original comment by R.Raghun...@gmail.com
on 3 Sep 2012 at 7:36
Patching only replaces individual references. To patch functions / classes that
you import you need to patch them where they are looked up not where they're
defined.
See the documentation section "where to patch":
http://www.voidspace.org.uk/python/mock/patch.html#where-to-patch
Original comment by fuzzyman
on 3 Sep 2012 at 8:36
Original issue reported on code.google.com by
R.Raghun...@gmail.com
on 3 Sep 2012 at 7:35