diff --git a/tests/test_ssl.py b/tests/test_ssl.py index f912a0bd1c8f83ef71e8e8080bba86e3dc9b1dee..6413c0d2a54624d67402d5a0ffbaf99be5ac2d84 100755 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -34,10 +34,16 @@ conf_servers = ( ('CM_SERVER_NAME', 'campusmanager'), ) +with open('/etc/hosts', 'r') as fo: + hosts = fo.read() + for s, d in conf_servers: v = conf.get(s) if v == d: - # vhost is using default value (the service is surely not installed) + # vhost is using default value, the service is surely not installed + continue + if v not in hosts: + # the domain is not in the hosts file, the service is surely not installed continue try: url = 'https://%s' % v