"""Utilities for the integration test suite.""" import requests def assert_ok(response: requests.Response) -> requests.Response: """Assert a 200 response, surfacing status, reason and URL on failure. Args: response: the response to check. Returns: The same response, for chaining. """ assert response.status_code == 200, ( f"\nStatus: {response.status_code}" f"\nReason: {response.reason}" f"\nURL: {response.url}" ) return response