cover pragma

This commit is contained in:
Colin Goutte 2021-10-07 12:22:37 +02:00
parent 02562bd899
commit d1cebb444c
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ conf.read("conf_notifications.ini")
def sondeid2notifsemails(idsonde, mapping=conf):
try:
section = mapping[idsonde]
except KeyError:
except KeyError: # pragma: no cover
raise KeyError(f"{idsonde} non trouvé dans {list(mapping.keys())}")
mails = section["email"]
@ -41,7 +41,7 @@ def sondeid2notifsemails(idsonde, mapping=conf):
return mails
def get_db():
def get_db(): # pragma: no cover
db = SessionLocal()
try:
yield db