Tests: "/config" prefix used.

This commit is contained in:
Andrey Zelenkov
2018-09-04 02:30:27 +03:00
parent dea7e0dc87
commit 6bebbe3e8a

View File

@@ -327,10 +327,13 @@ class TestUnitControl(TestUnitHTTP):
# TODO socket reuse
# TODO http client
def conf(self, conf, path='/'):
def conf(self, conf, path='/config'):
if isinstance(conf, dict):
conf = json.dumps(conf)
if path != '/config':
path = '/config' + path
return json.loads(self.put(
url=path,
body=conf,
@@ -338,14 +341,20 @@ class TestUnitControl(TestUnitHTTP):
addr=self.testdir + '/control.unit.sock'
)['body'])
def conf_get(self, path='/'):
def conf_get(self, path='/config'):
if path != '/config':
path = '/config' + path
return json.loads(self.get(
url=path,
sock_type='unix',
addr=self.testdir + '/control.unit.sock'
)['body'])
def conf_delete(self, path='/'):
def conf_delete(self, path='/config'):
if path != '/config':
path = '/config' + path
return json.loads(self.delete(
url=path,
sock_type='unix',