Explorar el Código

Skip TLS version test if TLSv1_2 is not available on platform

Signed-off-by: Joffrey F <[email protected]>
Joffrey F hace 9 años
padre
commit
80afbd3961
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      tests/unit/cli/command_test.py

+ 1 - 0
tests/unit/cli/command_test.py

@@ -55,6 +55,7 @@ class TestGetTlsVersion(object):
         environment = {}
         assert get_tls_version(environment) is None
 
+    @pytest.mark.skipif(not hasattr(ssl, 'PROTOCOL_TLSv1_2'), reason='TLS v1.2 unsupported')
     def test_get_tls_version_upgrade(self):
         environment = {'COMPOSE_TLS_VERSION': 'TLSv1_2'}
         assert get_tls_version(environment) == ssl.PROTOCOL_TLSv1_2