From 10d906bf7c2f9e06f3a9197456a1e630821b6711 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Wed, 22 Aug 2018 15:20:41 +0200 Subject: [PATCH] Fix test response recorder dropping self reference --- tests/fixtures/responses.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/responses.py b/tests/fixtures/responses.py index 0c5276a..b31f7dd 100644 --- a/tests/fixtures/responses.py +++ b/tests/fixtures/responses.py @@ -114,7 +114,10 @@ class Recorder(ContextManager['Recorder']): """ Overrides the session send method. """ - Session.send = self # type: ignore + def send(session, request, **kwargs): + return self(session, request, **kwargs) + + Session.send = send # type: ignore return self