getsentry / getsentry/sentry

Flaky test: tests/sentry/users/web/test_accounts.py::TestAccounts::test_relocate_recovery_post_multiple_orgs

Open
#108,885 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

flaky-test Tests
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

Failing test: tests/sentry/users/web/test_accounts.py::TestAccounts::test_relocate_recovery_post_multiple_orgs
Sentry sha: ab471d2d1ede60c8a8c1e3911b78a71a83261eae
Run: https://github.com/getsentry/sentry/actions/runs/22271635213

tests/sentry/users/web/test_accounts.py:201: in test_relocate_recovery_post_multiple_orgs
    terms_accepted_signal_mock.assert_has_calls(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:1014: in assert_has_calls
    raise AssertionError(
E   AssertionError: Calls not found.
E   Expected: [call(user=<User at 0x7fb8f117b0b0: id=2120>, organization=RpcOrganization(slug='neat-werewolf', id=4557676178046976, name='Neat Werewolf', flags=RpcOrganizationFlags(early_adopter=False, require_2fa=False, allow_joinleave=True, enhanced_privacy=False, disable_shared_issues=False, disable_new_visibility_features=False, require_email_verification=False, codecov_access=False, disable_member_project_creation=True, prevent_superuser_access=False, disable_member_invite=False), teams=[], projects=[], status=0, default_role='member', date_added=datetime.datetime(2026, 2, 22, 6, 18, 0, 42556, tzinfo=datetime.timezone.utc)), ip_address='127.0.0.1', sender=<function recover_confirm at 0x7fb90c762b60>),
E    call(user=<User at 0x7fb8f117b0b0: id=2120>, organization=RpcOrganization(slug='lenient-mudfish', id=4557676178046977, name='Lenient Mudfish', flags=RpcOrganizationFlags(early_adopter=False, require_2fa=False, allow_joinleave=True, enhanced_privacy=False, disable_shared_issues=False, disable_new_visibility_features=False, require_email_verification=False, codecov_access=False, disable_member_project_creation=True, prevent_superuser_access=False, disable_member_invite=False), teams=[], projects=[], status=0, default_role='member', date_added=datetime.datetime(2026, 2, 22, 6, 18, 0, 108251, tzinfo=datetime.timezone.utc)), ip_address='127.0.0.1', sender=<function recover_confirm at 0x7fb90c762b60>)]
E     Actual: [call(user=<User at 0x7fb8d6a40290: id=2120>, organization=RpcOrganization(slug='lenient-mudfish', id=4557676178046977, name='Lenient Mudfish', flags=RpcOrganizationFlags(early_adopter=False, require_2fa=False, allow_joinleave=True, enhanced_privacy=False, disable_shared_issues=False, disable_new_visibility_features=False, require_email_verification=False, codecov_access=False, disable_member_project_creation=True, prevent_superuser_access=False, disable_member_invite=False), teams=[], projects=[], status=0, default_role='member', date_added=datetime.datetime(2026, 2, 22, 6, 18, 0, 108251, tzinfo=datetime.timezone.utc)), ip_address='127.0.0.1', sender=<function recover_confirm at 0x7fb90c762b60>),
E    call(user=<User at 0x7fb8d6a40290: id=2120>, organization=RpcOrganization(slug='neat-werewolf', id=4557676178046976, name='Neat Werewolf', flags=RpcOrganizationFlags(early_adopter=False, require_2fa=False, allow_joinleave=True, enhanced_privacy=False, disable_shared_issues=False, disable_new_visibility_features=False, require_email_verification=False, codecov_access=False, disable_member_project_creation=True, prevent_superuser_access=False, disable_member_invite=False), teams=[], projects=[], status=0, default_role='member', date_added=datetime.datetime(2026, 2, 22, 6, 18, 0, 42556, tzinfo=datetime.timezone.utc)), ip_address='127.0.0.1', sender=<function recover_confirm at 0x7fb90c762b60>)]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading tests/sentry/users/web/test_accounts.py, especially TestAccounts::test_relocate_recovery_post_multiple_orgs and the assertion at line 201. Use the provided GitHub Actions run as the failure record and compare the expected and actual terms_accepted_signal_mock calls. Done means the named test passes with the expected calls consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.