def test_checks_for_bad_response(self): self.response.status = 404 with self.assertRaises(ClientResponseError): await self.session.request('/')