diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2022-01-31 23:10:30 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2022-01-31 23:10:30 +0000 |
commit | e53ce40c5854d95722cdfc198626fcd5aecbe563 (patch) | |
tree | fe3be3f5d9685c29424e84f0f08b9459ea5de37b /test/test_tls.py | |
parent | 485886d8f9a665e9c416a98dd00e5c836b6bf27c (diff) | |
download | unit-e53ce40c5854d95722cdfc198626fcd5aecbe563.tar.gz unit-e53ce40c5854d95722cdfc198626fcd5aecbe563.tar.bz2 |
Tests: removed TestApplicationTLS.get_server_certificate().
distutils.version is replaced by packaging.version. Also minor style fixes.
Diffstat (limited to 'test/test_tls.py')
-rw-r--r-- | test/test_tls.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_tls.py b/test/test_tls.py index 01336765..c4471f3f 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -175,11 +175,13 @@ basicConstraints = critical,CA:TRUE""" self.add_tls() - cert_old = self.get_server_certificate() + cert_old = ssl.get_server_certificate(('127.0.0.1', 7080)) self.certificate() - assert cert_old != self.get_server_certificate(), 'update certificate' + assert cert_old != ssl.get_server_certificate( + ('127.0.0.1', 7080) + ), 'update certificate' @pytest.mark.skip('not yet') def test_tls_certificate_key_incorrect(self): @@ -200,11 +202,13 @@ basicConstraints = critical,CA:TRUE""" self.add_tls() - cert_old = self.get_server_certificate() + cert_old = ssl.get_server_certificate(('127.0.0.1', 7080)) self.add_tls(cert='new') - assert cert_old != self.get_server_certificate(), 'change certificate' + assert cert_old != ssl.get_server_certificate( + ('127.0.0.1', 7080) + ), 'change certificate' def test_tls_certificate_key_rsa(self): self.load('empty') |