flake8
passed.
JSHint
passed.
Review Request #9761 — Created March 8, 2018 and submitted
When spying on methods, we replaced the method with a new instance, with
the intended purpose of preventing spies on an instance method from
impacting other instance methods. This caused subtle problems for
classmethods, which caused state to not be tracked quite right and to
leak.This change fixes this, ensuring we don't override any classmethods.
Unit tests pass on all supported Python versions.
The breakages I encountered spying on classmethods in some Djblets
unit tests went away.