Skip to content

Commit

Permalink
Fixed #1559: fix new python errors flagged by latest flake8 (#1560)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgiusti authored Jul 12, 2024
1 parent aeac436 commit 818627a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions tests/system_tests_http1_adaptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,23 +1734,23 @@ def test_06_bad_request_headers(self):
# unsupported version
b'GET /wrongversion HTTP/0.9\r\n',
# invalid header format
b'GET /badheader HTTP/1.1\r\n' \
b'GET /badheader HTTP/1.1\r\n'
+ b'novalue\r\n\r\n',
# invalid header format 2
b'GET /badheader1 HTTP/1.1\r\n' \
b'GET /badheader1 HTTP/1.1\r\n'
+ b'novalue :\r\n\r\n',
# invalid transfer encoding value
b'PUT /bad/encoding HTTP/1.1\r\n' \
b'PUT /bad/encoding HTTP/1.1\r\n'
+ b'Transfer-Encoding: bannana\r\n\r\nBLAH',
# invalid content length format
b'PUT /bad/len1 HTTP/1.1\r\n' \
b'PUT /bad/len1 HTTP/1.1\r\n'
+ b'Content-Length:\r\n\r\nFOO',
# invalid content length
b'PUT /bad/len2 HTTP/1.1\r\n' \
b'PUT /bad/len2 HTTP/1.1\r\n'
+ b'Content-Length: spaghetti\r\n\r\nFOO',
# duplicate conflicting content length fields
b'PUT /dup/len3 HTTP/1.1\r\n' \
+ b'Content-length: 1\r\n' \
b'PUT /dup/len3 HTTP/1.1\r\n'
+ b'Content-length: 1\r\n'
+ b'Content-length: 2\r\n\r\nHA',
]

Expand Down
8 changes: 4 additions & 4 deletions tests/system_tests_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def setUpClass(cls):
'caCertFile': CA_CERT,
'certFile': SERVER_CERTIFICATE,
'privateKeyFile': SERVER_PRIVATE_KEY,
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:' \
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:'
'DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS',
'password': SERVER_PRIVATE_KEY_PASSWORD})
])
Expand Down Expand Up @@ -697,7 +697,7 @@ def setUpClass(cls):
# setup chain of calls to pn_ssl_domain_* functions.
('sslProfile', {'name': 'ssl-profile-tls-all',
'caCertFile': ssl_file('ca-certificate-INVALID-FILENAME.pem'),
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:' \
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:'
'DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS'})
])

Expand Down Expand Up @@ -831,7 +831,7 @@ def setUpClass(cls):
'caCertFile': CA_CERT,
'certFile': SERVER_CERTIFICATE,
'privateKeyFile': SERVER_PRIVATE_KEY,
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:' \
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:'
'DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS',
'password': SERVER_PRIVATE_KEY_PASSWORD})
])
Expand All @@ -850,7 +850,7 @@ def setUpClass(cls):
# router to connect. The object is to trigger a certificate verification failure while hostname verification is off.
('sslProfile', {'name': 'ssl-profile-tls-all',
'caCertFile': BAD_CA_CERT,
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:' \
'ciphers': 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:'
'DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS'})
])

Expand Down

0 comments on commit 818627a

Please sign in to comment.