From 07bc1a031c23b016f77f1834493a705e0a512caf Mon Sep 17 00:00:00 2001 From: Sam Morgan Date: Wed, 29 Nov 2023 12:33:22 -0800 Subject: [PATCH] Fix incorrect status code on playback --- httpretty/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpretty/core.py b/httpretty/core.py index 69686458..5cf02e3b 100644 --- a/httpretty/core.py +++ b/httpretty/core.py @@ -1585,7 +1585,8 @@ def playback(cls, filename, allow_net_connect=True, verbose=False): method = item['request']['method'] body = item['response']['body'] headers = item['response']['headers'] - cls.register_uri(method, uri, body=body, forcing_headers=headers) + status = item['response']['status'] + cls.register_uri(method, uri, body=body, forcing_headers=headers, status=status) yield cls.disable()