summaryrefslogtreecommitdiffhomepage
path: root/test/test_asgi_application.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-04-05 14:03:05 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2021-04-05 14:03:05 +0100
commit6c97a1a069f0ae8cf683c8364fb7f9dabc5e89cb (patch)
treea7eab02b6fc63ff8d1a1329a090162715371aa62 /test/test_asgi_application.py
parent46d8567dd7c2a9af025f1de13084a9efd7118e20 (diff)
downloadunit-6c97a1a069f0ae8cf683c8364fb7f9dabc5e89cb.tar.gz
unit-6c97a1a069f0ae8cf683c8364fb7f9dabc5e89cb.tar.bz2
Tests: style.
Diffstat (limited to 'test/test_asgi_application.py')
-rw-r--r--test/test_asgi_application.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/test_asgi_application.py b/test/test_asgi_application.py
index 886a160b..70b2e4c3 100644
--- a/test/test_asgi_application.py
+++ b/test/test_asgi_application.py
@@ -3,13 +3,15 @@ import time
from distutils.version import LooseVersion
import pytest
+
from unit.applications.lang.python import TestApplicationPython
from unit.option import option
class TestASGIApplication(TestApplicationPython):
- prerequisites = {'modules': {'python':
- lambda v: LooseVersion(v) >= LooseVersion('3.5')}}
+ prerequisites = {
+ 'modules': {'python': lambda v: LooseVersion(v) >= LooseVersion('3.5')}
+ }
load_module = 'asgi'
def findall(self, pattern):
@@ -31,7 +33,8 @@ Content-Type: text/html
Connection: close
custom-header: BLAH
-%s""" % (len(body), body.encode()),
+%s"""
+ % (len(body), body.encode()),
raw=True,
)
@@ -145,7 +148,7 @@ custom-header: BLAH
assert 'success' in self.conf(
'{"http":{"max_body_size": ' + str(max_body_size) + ' }}',
- 'settings'
+ 'settings',
)
assert self.get()['status'] == 200, 'init'
@@ -398,7 +401,7 @@ Connection: close
socks.append(sock)
- time.sleep(1.0) # required to avoid greedy request reading
+ time.sleep(1.0) # required to avoid greedy request reading
threads = set()