Skip to content

Commit

Permalink
Merge pull request #4896 from open-formulieren/cleanup/flaky-msgraph-…
Browse files Browse the repository at this point in the history
…test

💚 Fix flaky msgraph test
  • Loading branch information
sergei-maertens authored Dec 10, 2024
2 parents f387e17 + 4729ee7 commit 3e7b959
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def register_submission(self, submission: Submission, options: dict) -> None:
data["__metadata__"] = {"submission_language": submission.language_code}
uploader.upload_json(data, folder_name / "data.json")

for attachment in submission.attachments.all():
for attachment in submission.attachments.order_by("pk"):
uploader.upload_django_file(
attachment.content,
folder_name / "attachments" / attachment.get_display_name(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def test_submission(self, upload_mock):

set_submission_reference(submission)

with patch.object(Account, "is_authenticated", True), patch.object(
Drive, "get_root_folder", return_value=MockFolder()
with (
patch.object(Account, "is_authenticated", True),
patch.object(Drive, "get_root_folder", return_value=MockFolder()),
):
graph_submission = MSGraphRegistration("microsoft-graph")
graph_submission.register_submission(submission, self.options)
Expand Down

0 comments on commit 3e7b959

Please sign in to comment.