diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2022-04-11 21:05:14 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2022-04-11 21:05:14 +0100 |
commit | 0f725346603f4de4473d12da502104b188ac02a4 (patch) | |
tree | 7f8254a816965d49c4d6d98da34f00c81894f7e8 /test/test_http_header.py | |
parent | aeed86c6829c62359e79f239b849766efb8857a7 (diff) | |
download | unit-0f725346603f4de4473d12da502104b188ac02a4.tar.gz unit-0f725346603f4de4473d12da502104b188ac02a4.tar.bz2 |
Tests: style.
Diffstat (limited to 'test/test_http_header.py')
-rw-r--r-- | test/test_http_header.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/test_http_header.py b/test/test_http_header.py index ca355eb7..6773c44f 100644 --- a/test/test_http_header.py +++ b/test/test_http_header.py @@ -213,7 +213,7 @@ Connection: close self.post( headers={ 'Host': 'localhost', - 'Content-Length': str(2 ** 64), + 'Content-Length': str(2**64), 'Connection': 'close', }, body='X' * 1000, @@ -325,9 +325,7 @@ Connection: close def test_http_header_host_port_empty(self): self.load('host') - resp = self.get( - headers={'Host': 'exmaple.com:', 'Connection': 'close'} - ) + resp = self.get(headers={'Host': 'exmaple.com:', 'Connection': 'close'}) assert resp['status'] == 200, 'Host port empty status' assert ( @@ -376,9 +374,7 @@ Connection: close def test_http_header_host_trailing_period_2(self): self.load('host') - resp = self.get( - headers={'Host': 'EXAMPLE.COM.', 'Connection': 'close'} - ) + resp = self.get(headers={'Host': 'EXAMPLE.COM.', 'Connection': 'close'}) assert resp['status'] == 200, 'Host trailing period 2 status' assert ( @@ -453,14 +449,16 @@ Connection: close assert 'CUSTOM' not in resp['headers']['All-Headers'] assert 'success' in self.conf( - {'http': {'discard_unsafe_fields': False}}, 'settings', + {'http': {'discard_unsafe_fields': False}}, + 'settings', ) resp = check_status("!#$%&'*+.^`|~Custom_Header") assert 'CUSTOM' in resp['headers']['All-Headers'] assert 'success' in self.conf( - {'http': {'discard_unsafe_fields': True}}, 'settings', + {'http': {'discard_unsafe_fields': True}}, + 'settings', ) resp = check_status("!Custom-Header") |