Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 35) sorted by relevance

12

/unit/test/python/iter_exception/
H A Dwsgi.py3 self.environ = environ
6 self.next = self.__next__
8 def __iter__(self): argument
9 self.__i = 0
10 self._skip_level = int(self.environ.get('HTTP_X_SKIP', 0))
11 self._not_skip_close = int(self.environ.get('HTTP_X_NOT_SKIP_CLOSE', 0))
12 self._is_chunked = self.environ.get('HTTP_X_CHUNKED')
31 return self
33 def __next__(self): argument
37 self.__i += 1
[all …]
/unit/test/perl/body_io_fake/
H A DIOFake.pm6 my $self = {};
8 $self->{_count} = 2;
9 $self->{_errors} = $errors;
11 bless $self, $class;
12 return $self;
16 my $self = shift;
18 if ($self->{_count} > 0) {
19 return $self->{_count}--;
22 $self->{_errors}->print('IOFake getline() $/ is ' . ${ $/ });
28 my $self = shift;
[all …]
/unit/test/unit/
H A Dcontrol.py8 def args_wrapper(self, *args): argument
25 arguments = (self, url) if conf is None else (self, conf, url)
34 def conf(self, conf, url): argument
35 return self.put(**self._get_args(url, conf))['body']
38 def conf_get(self, url): argument
39 return self.get(**self._get_args(url))['body']
42 def conf_delete(self, url): argument
43 return self.delete(**self._get_args(url))['body']
46 def conf_post(self, conf, url): argument
47 return self.post(**self._get_args(url, conf))['body']
[all …]
H A Dhttp.py15 def http(self, start_str, **kwargs): argument
90 self.log_out(req, encoding)
110 self.log_in(resp)
139 def log_in(self, log): argument
161 def delete(self, **kwargs): argument
164 def get(self, **kwargs): argument
167 def head(self, **kwargs): argument
170 def post(self, **kwargs): argument
173 def put(self, **kwargs): argument
280 def _parse_json(self, resp): argument
[all …]
H A Doption.py16 def __setattr__(self, name, value): argument
19 def __getattr__(self, name): argument
/unit/test/unit/applications/
H A Dtls.py10 def __init__(self): argument
12 self._default_context.check_hostname = False
13 self._default_context.verify_mode = ssl.CERT_NONE
15 def certificate(self, name='default', load=True): argument
16 self.openssl_conf()
37 self.certificate_load(name)
39 def certificate_load(self, crt, key=None): argument
49 def get_ssl(self, **kwargs): argument
53 def post_ssl(self, **kwargs): argument
93 def load(self, script, name=None): argument
[all …]
H A Dwebsockets.py25 def key(self): argument
29 def accept(self, key): argument
33 def upgrade(self, headers=None): argument
37 key = self.key()
47 sock = self.get(
61 resp = self._resp_to_dict(resp)
66 def apply_mask(self, data, mask): argument
72 def frame_read(self, sock, read_timeout=60): argument
122 if frame['opcode'] == self.OP_CLOSE:
144 self, argument
[all …]
H A Dproto.py10 def get_application_type(self): argument
15 return option.generated_tests.get(current_test, self.application_type)
17 def _load_conf(self, conf, **kwargs): argument
32 assert 'success' in self.conf(conf), 'load application configuration'
/unit/test/python/ctx_iter_atexit/
H A Dwsgi.py5 def __init__(self, environ, start_response): argument
6 self.environ = environ
7 self.start = start_response
9 def __iter__(self): argument
10 atexit.register(self._atexit)
12 content_length = int(self.environ.get('CONTENT_LENGTH', 0))
13 body = bytes(self.environ['wsgi.input'].read(content_length))
15 self.start(
23 def _atexit(self): argument
24 self.start('200', [('Content-Length', '0')])
/unit/test/python/close/
H A Dwsgi.py2 def __init__(self, environ, start_response): argument
3 self.environ = environ
4 self.start = start_response
6 def __iter__(self): argument
7 self.start('200', [(('Content-Length', '0'))])
10 def close(self): argument
11 self.environ['wsgi.errors'].write('Close called.\n')
12 self.environ['wsgi.errors'].flush()
/unit/test/python/close_error/
H A Dwsgi.py2 def __init__(self, environ, start_response): argument
3 self.environ = environ
4 self.start = start_response
6 def __iter__(self): argument
7 self.start('200', [(('!', '0'))])
10 def close(self): argument
11 self.environ['wsgi.errors'].write('Close called.\n')
12 self.environ['wsgi.errors'].flush()
/unit/test/unit/applications/lang/
H A Dnode.py10 def __init__(self, application_type='node', es_modules=False): argument
11 self.application_type = application_type
12 self.es_modules = es_modules
14 def prepare_env(self, script): argument
28 def load(self, script, name='app.js', **kwargs): argument
29 self.prepare_env(script)
31 if self.es_modules:
44 self._load_conf(
H A Druby.py9 def __init__(self, application_type='ruby'): argument
10 self.application_type = application_type
12 def prepare_env(self, script): argument
20 def load(self, script, name='config.ru', **kwargs): argument
21 self.prepare_env(script)
26 "type": self.get_application_type(),
38 self._load_conf(
H A Dpython.py10 def __init__(self, application_type='python', load_module='wsgi'): argument
11 self.application_type = application_type
12 self.load_module = load_module
14 def load(self, script, name=None, module=None, **kwargs): argument
19 module = self.load_module
37 "type": self.get_application_type(),
58 self._load_conf(
H A Dperl.py6 def __init__(self, application_type='perl'): argument
7 self.application_type = application_type
9 def load(self, script, name='psgi.pl', **kwargs): argument
12 self._load_conf(
17 "type": self.get_application_type(),
H A Djava.py12 def __init__(self, application_type='java'): argument
13 self.application_type = application_type
15 def prepare_env(self, script): argument
94 def load(self, script, **kwargs): argument
95 self.prepare_env(script)
98 self._load_conf(
104 "type": self.get_application_type(),
H A Dphp.py9 def __init__(self, application_type='php'): argument
10 self.application_type = application_type
12 def load(self, script, index='index.php', **kwargs): argument
26 "type": self.get_application_type(),
42 self._load_conf(
H A Dgo.py80 def load(self, script, name='app', **kwargs): argument
105 self._load_conf(conf, **kwargs)
/unit/test/python/threading/
H A Dwsgi.py9 def __init__(self, x): argument
10 self.__x = x
11 threading.Thread.__init__(self)
13 def log_index(self, index): argument
17 def run(self): argument
20 self.log_index(i)
23 self.log_index(i)
H A Dasgi.py9 def __init__(self, x): argument
10 self.__x = x
11 threading.Thread.__init__(self)
13 def log_index(self, index): argument
17 def run(self): argument
20 self.log_index(i)
23 self.log_index(i)
/unit/test/python/not_iterable/
H A Dwsgi.py2 def __init__(self, environ, start_response): argument
3 self.environ = environ
4 self.start = start_response
6 def __iter__(self): argument
7 self.start('200', [(('Content-Length', '0'))])
/unit/src/python/
H A Dnxt_python_asgi.h51 void nxt_py_asgi_dealloc(PyObject *self);
52 PyObject *nxt_py_asgi_await(PyObject *self);
53 PyObject *nxt_py_asgi_iter(PyObject *self);
54 PyObject *nxt_py_asgi_next(PyObject *self);
H A Dnxt_python_asgi_lifespan.c38 static PyObject *nxt_py_asgi_lifespan_send(PyObject *self, PyObject *dict);
47 static void nxt_py_asgi_lifespan_dealloc(PyObject *self);
403 nxt_py_asgi_lifespan_receive(PyObject *self, PyObject *none) in nxt_py_asgi_lifespan_receive() argument
409 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_receive()
447 nxt_py_asgi_lifespan_send(PyObject *self, PyObject *dict) in nxt_py_asgi_lifespan_send() argument
463 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_send()
589 nxt_py_asgi_lifespan_done(PyObject *self, PyObject *future) in nxt_py_asgi_lifespan_done() argument
596 lifespan = (nxt_py_asgi_lifespan_t *) self; in nxt_py_asgi_lifespan_done()
650 nxt_py_asgi_lifespan_dealloc(PyObject *self) in nxt_py_asgi_lifespan_dealloc() argument
652 nxt_py_asgi_lifespan_t *lifespan = (nxt_py_asgi_lifespan_t *)self; in nxt_py_asgi_lifespan_dealloc()
[all …]
H A Dnxt_python_asgi_http.c34 static PyObject *nxt_py_asgi_http_receive(PyObject *self, PyObject *none);
36 static PyObject *nxt_py_asgi_http_send(PyObject *self, PyObject *dict);
44 static PyObject *nxt_py_asgi_http_done(PyObject *self, PyObject *future);
113 nxt_py_asgi_http_receive(PyObject *self, PyObject *none) in nxt_py_asgi_http_receive() argument
120 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_receive()
254 nxt_py_asgi_http_send(PyObject *self, PyObject *dict) in nxt_py_asgi_http_send() argument
264 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_send()
655 nxt_py_asgi_http_done(PyObject *self, PyObject *future) in nxt_py_asgi_http_done() argument
661 http = (nxt_py_asgi_http_t *) self; in nxt_py_asgi_http_done()
/unit/src/ruby/
H A Dnxt_ruby_stream_io.c12 static VALUE nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self);
74 VALUE self; in nxt_ruby_stream_io_new() local
76 self = Data_Wrap_Struct(class, 0, 0, (void *) (uintptr_t) arg); in nxt_ruby_stream_io_new()
78 rb_obj_call_init(self, 0, NULL); in nxt_ruby_stream_io_new()
80 return self; in nxt_ruby_stream_io_new()
85 nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self) in nxt_ruby_stream_io_initialize() argument
87 return self; in nxt_ruby_stream_io_initialize()

12