diff --git a/tests/core/response/test_response.py b/tests/core/response/test_response.py index 7492694f..286ef745 100644 --- a/tests/core/response/test_response.py +++ b/tests/core/response/test_response.py @@ -15,3 +15,9 @@ def test_encoding_chinese_characters(self): response = Response(self.application) content = response.json({"test": "我"}) self.assertEqual(content.decode("utf-8"), '{"test": "我"}') + + def test_redirect_external(self): + response = Response(self.application) + response = response.redirect("https://google.com") + self.assertEqual(response._status, "302 Found") + self.assertEqual(response.header_bag.get("Location").value, "https://google.com")