Use __future__.absolute_import for spies function.
Review Request #8720 — Created Feb. 6, 2017 and submitted
I was encountering a bizarre problem where running a unit test that included a
spy was failing with
ImportError: cannot import name currentframe. After
doing some digging, I found out that the
inspectmodule that was being
imported was actually
django.utils.inspectrather than the top-level
Was able to run my unit test successfully.