Skip to content

Commit

Permalink
🎨 Suppress management command output (in tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Sep 6, 2024
1 parent 6170691 commit c601dd3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/openforms/authentication/tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from io import StringIO

from django.core.management import call_command

from openforms.celery import app
Expand All @@ -11,7 +13,7 @@ def hash_identifying_attributes(auth_info_id: int):
auth_info.hash_identifying_attributes()


@app.task
@app.task(ignore_result=True)
def update_saml_metadata() -> None:
"""
A weekly task for updating the SAML metadata concerning DigiD/Eherkenning
Expand All @@ -20,5 +22,6 @@ def update_saml_metadata() -> None:
`digid_eherkenning.management.commands` module of django-digid-eherkenning library.
Updates the stored metadata file and prepopulates the db fields.
"""
call_command("update_stored_metadata", "digid")
call_command("update_stored_metadata", "eherkenning")
stdout = StringIO()
call_command("update_stored_metadata", "digid", stdout=stdout)
call_command("update_stored_metadata", "eherkenning", stdout=stdout)

0 comments on commit c601dd3

Please sign in to comment.