control.py (1596:b7e2d4d92624) control.py (1654:fc7d0578e124)
1import json
2
1import json
2
3from conftest import option
3from unit.http import TestHTTP
4
5
6def args_handler(conf_func):
7 def args_wrapper(self, *args):
8 argcount = conf_func.__code__.co_argcount
9 url_default = '/config'
10 conf = None

--- 37 unchanged lines hidden (view full) ---

48 @args_handler
49 def conf_post(self, conf, url):
50 return self.post(**self._get_args(url, conf))['body']
51
52 def _get_args(self, url, conf=None):
53 args = {
54 'url': url,
55 'sock_type': 'unix',
4from unit.http import TestHTTP
5
6
7def args_handler(conf_func):
8 def args_wrapper(self, *args):
9 argcount = conf_func.__code__.co_argcount
10 url_default = '/config'
11 conf = None

--- 37 unchanged lines hidden (view full) ---

49 @args_handler
50 def conf_post(self, conf, url):
51 return self.post(**self._get_args(url, conf))['body']
52
53 def _get_args(self, url, conf=None):
54 args = {
55 'url': url,
56 'sock_type': 'unix',
56 'addr': self.temp_dir + '/control.unit.sock',
57 'addr': option.temp_dir + '/control.unit.sock',
57 }
58
59 if conf is not None:
60 args['body'] = conf
61
62 return args
58 }
59
60 if conf is not None:
61 args['body'] = conf
62
63 return args