def ensure_response_header_contains_proper_throttle_field(
        self, path, monkeypatch, *throttling_class, expected_headers=()
    ):
        """
        Ensure the response returns an Retry-After field with status and next attributes
        set properly.
        """
        for timer, expect in expected_headers:
            with self.set_throttle_timer(monkeypatch, *throttling_class, value=timer):
                response = client.get(f"/{path}", user=self.user)
                if expect is not None:
                    assert response._response["Retry-After"] == expect
                else:
                    assert "Retry-After" not in response._response

        Ensure the response returns an Retry-After field with status and next attributes
        set properly.
        
tests/test_throthling/test_decorator.py