From 8b263a8d65ddb74342f9d001c14d201a6b5b7a53 Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Tue, 25 Jun 2024 11:27:07 -0400 Subject: [PATCH] ref: fix accessing user_id from Member in tests --- tests/sentry/runner/commands/test_createuser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sentry/runner/commands/test_createuser.py b/tests/sentry/runner/commands/test_createuser.py index ac83b23eaac66e..89d47bebfca72e 100644 --- a/tests/sentry/runner/commands/test_createuser.py +++ b/tests/sentry/runner/commands/test_createuser.py @@ -66,6 +66,7 @@ def test_single_org(self): with assume_test_silo_mode(SiloMode.REGION): assert OrganizationMember.objects.count() == 1 member = OrganizationMember.objects.all()[0] + assert member.user_id is not None u = user_service.get_user(user_id=member.user_id) assert u assert u.email == "you@somewhereawesome.com" @@ -80,6 +81,7 @@ def test_single_org_superuser(self): with assume_test_silo_mode(SiloMode.REGION): assert OrganizationMember.objects.count() == 1 member = OrganizationMember.objects.all()[0] + assert member.user_id is not None u = user_service.get_user(user_id=member.user_id) assert u assert u.email == "you@somewhereawesome.com"