ClickHouse/tests/queries/0_stateless/helpers/httpclient.py

15 lines
339 B
Python
Raw Normal View History

import os
import sys
CURDIR = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(CURDIR))
import httpexpect
def client(request, name='', log=None):
2020-10-02 16:54:07 +00:00
client = httpexpect.spawn({'host':'localhost','port':8123,'timeout':1}, request)
client.logger(log, prefix=name)
client.timeout(20)
return client