forked from Github-Mirrors/canaille
Commands does not executed ldap setup and teardown in testing context
This commit is contained in:
parent
23276e60ca
commit
28adc08795
1 changed files with 4 additions and 2 deletions
|
@ -25,7 +25,8 @@ def clean():
|
||||||
teardown_backend,
|
teardown_backend,
|
||||||
)
|
)
|
||||||
|
|
||||||
setup_backend(current_app)
|
if not current_app.config["TESTING"]:
|
||||||
|
setup_backend(current_app)
|
||||||
|
|
||||||
for t in Token.all():
|
for t in Token.all():
|
||||||
if t.is_expired():
|
if t.is_expired():
|
||||||
|
@ -35,7 +36,8 @@ def clean():
|
||||||
if a.is_expired():
|
if a.is_expired():
|
||||||
a.delete()
|
a.delete()
|
||||||
|
|
||||||
teardown_backend(current_app)
|
if not current_app.config["TESTING"]:
|
||||||
|
teardown_backend(current_app)
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
|
Loading…
Reference in a new issue