diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-09-04 02:30:27 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-09-04 02:30:27 +0300 |
commit | 6bebbe3e8a0732628514f356a7db470a110a76e6 (patch) | |
tree | b7252d3f0c552aa0ade486bf9ab725035cf85841 /test/unit.py | |
parent | dea7e0dc87dc2e63c4702cf6714aa3e946f64ca6 (diff) | |
download | unit-6bebbe3e8a0732628514f356a7db470a110a76e6.tar.gz unit-6bebbe3e8a0732628514f356a7db470a110a76e6.tar.bz2 |
Tests: "/config" prefix used.
Diffstat (limited to '')
-rw-r--r-- | test/unit.py | 15 |
1 files changed, 12 insertions, 3 deletions
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', |