def METHOD_NAME(self):
    self.args = [
        "command_dummy",
        "--host",
        TESTSERVER_URL + "/service?request=GetCapabilities",
    ]
    with open(SERVICE_EXCEPTION_FILE, "rb") as fp:
        capabilities_doc = fp.read()
        with mock_httpd(
            TESTSERVER_ADDRESS,
            [
                (
                    {
                        "path": "/service?request=GetCapabilities&version=1.1.1&service=WMS",
                        "method": "GET",
                    },
                    {"status": "200", "body": capabilities_doc},
                )
            ],
        ):
            with capture() as (out, err):
                with pytest.raises(SystemExit):
                    wms_capabilities_command(self.args)
            error_msg = err.getvalue().rsplit("-" * 80, 1)[1].strip()
            assert "Not a capabilities document" in error_msg