def test_download_application_createSessionError_fails(self):
        """
        Test that download_application fails when session creation fails
        """
        original_post = httpx.Client.post

        def modified_post(*args, **kwargs):
            resp = original_post(*args, **kwargs)
            resp.status_code = 500
            return resp

        with patch.object(httpx.Client, "post", new=modified_post):
            with self.assertRaises(VespaError):
                self.client.download_application()

        Test that download_application fails when session creation fails
        
tests/integ_tests/vespa/test_vespa_client.py