• 
      

    Use __future__.absolute_import for spies function.

    Review Request #8720 — Created Feb. 6, 2017 and submitted — Latest diff uploaded

    Information

    kgb
    master
    899b741...

    Reviewers

    kgb

    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 inspect module that was being
    imported was actually django.utils.inspect rather than the top-level
    standard library inspect. Adding absolute_import fixes this.

    Was able to run my unit test successfully.