1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-06 14:54:00 +02:00

Cover also settings files, keep 100% coverage by ignoring production files

This commit is contained in:
Yohann D'ANELLO
2020-11-03 19:13:33 +01:00
parent fa368a399a
commit 1ddf39f296
11 changed files with 75 additions and 35 deletions

View File

@ -6,7 +6,7 @@ _client = None
def get_sympa_client():
global _client
if _client is None:
if os.getenv("SYMPA_PASSWORD", None) is not None:
if os.getenv("SYMPA_PASSWORD", None) is not None: # pragma: no cover
from sympasoap import Client
_client = Client("https://" + os.getenv("SYMPA_URL"))
_client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD"))