How do I mock a class that has unbound methods? For example, this class has a @classmethod and a @staticmethod:
@classmethod
@staticmethod
class Calculator(objec
One way to do it is
def test_increment(mocker): mocker.patch.object(Calculator, attribute='increment', return_value=10) ...actual test code...