From 2bb783621dbba2b208e70f14e8bbda6a4eb23a51 Mon Sep 17 00:00:00 2001 From: abram axel booth Date: Fri, 18 Oct 2024 10:26:05 -0400 Subject: [PATCH] testfix: avoid nondeterministic test fail --- .../institutions/views/test_institution_user_metric_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api_tests/institutions/views/test_institution_user_metric_list.py b/api_tests/institutions/views/test_institution_user_metric_list.py index 29881e2e292..19508928185 100644 --- a/api_tests/institutions/views/test_institution_user_metric_list.py +++ b/api_tests/institutions/views/test_institution_user_metric_list.py @@ -76,7 +76,7 @@ def populate_counts(self, institution, user, user2): department='Biology dept', public_project_count=6, private_project_count=5, - ).save() + ).save(refresh=True) UserInstitutionProjectCounts( user_id=user2._id, @@ -101,7 +101,7 @@ def populate_more_counts(self, institution, user, user2, user3, populate_counts) department='Psychology dept', public_project_count=int(10 * random()), private_project_count=int(10 * random()), - ).save() + ).save(refresh=True) UserInstitutionProjectCounts( user_id=user3._id,