Skip to content

Commit

Permalink
fixup!: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rgraber committed Sep 17, 2024
1 parent 06cb2ff commit 55b66ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kobo/apps/audit_log/tests/test_one_time_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from trench.utils import get_mfa_model

from kobo.apps.audit_log.models import AuditAction, AuditLog
from kobo.apps.audit_log.tests.test_utils import skip_all_signals
from kobo.apps.kobo_auth.shortcuts import User
from kobo.apps.openrosa.apps.main.models import UserProfile
from kpi.models import AuthorizedApplication
Expand Down Expand Up @@ -152,8 +153,9 @@ def side_effect(request):
action=AuditAction.AUTH,
metadata__auth_type='submission',
).exists()
# this may create 2 logs because of submission groups,
# so just make sure the log we care about exists
self.assertTrue(log_exists)
self.assertEqual(AuditLog.objects.count(), 1)

def test_authorized_application_auth_creates_log(self):
app: AuthorizedApplication = AuthorizedApplication(name='Auth app')
Expand Down

0 comments on commit 55b66ea

Please sign in to comment.