Commands does not executed ldap setup and teardown in testing context

This commit is contained in:
Éloi Rivard 2022-10-03 13:25:13 +02:00
parent 23276e60ca
commit 28adc08795

View file

@ -25,6 +25,7 @@ def clean():
teardown_backend, teardown_backend,
) )
if not current_app.config["TESTING"]:
setup_backend(current_app) setup_backend(current_app)
for t in Token.all(): for t in Token.all():
@ -35,6 +36,7 @@ def clean():
if a.is_expired(): if a.is_expired():
a.delete() a.delete()
if not current_app.config["TESTING"]:
teardown_backend(current_app) teardown_backend(current_app)