Tests: "/config" prefix used.
This commit is contained in:
15
test/unit.py
15
test/unit.py
@@ -327,10 +327,13 @@ class TestUnitControl(TestUnitHTTP):
|
|||||||
# TODO socket reuse
|
# TODO socket reuse
|
||||||
# TODO http client
|
# TODO http client
|
||||||
|
|
||||||
def conf(self, conf, path='/'):
|
def conf(self, conf, path='/config'):
|
||||||
if isinstance(conf, dict):
|
if isinstance(conf, dict):
|
||||||
conf = json.dumps(conf)
|
conf = json.dumps(conf)
|
||||||
|
|
||||||
|
if path != '/config':
|
||||||
|
path = '/config' + path
|
||||||
|
|
||||||
return json.loads(self.put(
|
return json.loads(self.put(
|
||||||
url=path,
|
url=path,
|
||||||
body=conf,
|
body=conf,
|
||||||
@@ -338,14 +341,20 @@ class TestUnitControl(TestUnitHTTP):
|
|||||||
addr=self.testdir + '/control.unit.sock'
|
addr=self.testdir + '/control.unit.sock'
|
||||||
)['body'])
|
)['body'])
|
||||||
|
|
||||||
def conf_get(self, path='/'):
|
def conf_get(self, path='/config'):
|
||||||
|
if path != '/config':
|
||||||
|
path = '/config' + path
|
||||||
|
|
||||||
return json.loads(self.get(
|
return json.loads(self.get(
|
||||||
url=path,
|
url=path,
|
||||||
sock_type='unix',
|
sock_type='unix',
|
||||||
addr=self.testdir + '/control.unit.sock'
|
addr=self.testdir + '/control.unit.sock'
|
||||||
)['body'])
|
)['body'])
|
||||||
|
|
||||||
def conf_delete(self, path='/'):
|
def conf_delete(self, path='/config'):
|
||||||
|
if path != '/config':
|
||||||
|
path = '/config' + path
|
||||||
|
|
||||||
return json.loads(self.delete(
|
return json.loads(self.delete(
|
||||||
url=path,
|
url=path,
|
||||||
sock_type='unix',
|
sock_type='unix',
|
||||||
|
|||||||
Reference in New Issue
Block a user