def test_deploy_application_successful(self):
        """
        Test that deploy_application works. To ensure we're not changing our local Vespa, we download the current
        application and deploy it. This means this test fails if donwload_application fails, even though we're not
        testing that here.
        """

        def get_vespa_app_generation() -> int:
            """
            Get the current Vespa application generation
            """
            resp = httpx.get("http://localhost:19071/application/v2/tenant/default/application/default")
            return resp.json()["generation"]

        app = self.client.download_application()

        with patch.object(httpx.Client, "post", wraps=httpx.post) as mock_post:
            generation_before = get_vespa_app_generation()

            self.client.deploy_application(app)

            generation_after = get_vespa_app_generation()

            self.assertTrue(generation_after > generation_before)  # note generation can increase by more than 1
            mock_post.assert_called_once()
            self.assertTrue('prepareandactivate' in mock_post.call_args[0][0])

        Test that deploy_application works. To ensure we're not changing our local Vespa, we download the current
        application and deploy it. This means this test fails if donwload_application fails, even though we're not
        testing that here.
        
tests/integ_tests/vespa/test_vespa_client.py