From eef2e2c40fbb731480476cf91192b9aa33412fc7 Mon Sep 17 00:00:00 2001 From: anthony sottile <103459774+asottile-sentry@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:52:49 -0400 Subject: [PATCH] ref: fix accessing user_id from Member in tests (#73587) --- 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"