From 6bebbe3e8a0732628514f356a7db470a110a76e6 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Tue, 4 Sep 2018 02:30:27 +0300 Subject: Tests: "/config" prefix used. --- test/unit.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/unit.py b/test/unit.py index 9e962b04..35c00f97 100644 --- a/test/unit.py +++ b/test/unit.py @@ -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', -- cgit