예제 #1
0
def test_query_tool_with_no_server_verbose():
    msg = de_query_tool.main(["foo", "--verbose"])
    if (
        "Connection refused" not in msg
        and "Cannot assign requested address" not in msg
        and "Network is unreachable" not in msg
    ):
        raise ValueError(msg)
예제 #2
0
    def de_query_tool_run_cli(self, *args):
        """
        Run the DE Query Tool CLI with these args.
        The DE Server host/port are automatically set for you.

        Returns:
            str: Query result
        """
        return de_query_tool.main([
            "--host", self.server_address[0], "--port",
            str(self.server_address[1]), *args
        ])
예제 #3
0
def test_query_tool_with_no_server():
    assert de_query_tool.main(['foo']) == \
        "An error occurred while trying to access a DE server at 'http://localhost:8888'\n" + \
        "Please ensure that the host and port names correspond to a running DE instance."