Skip to content

ref(cells): Update org creation testutils to pass cell kwarg#111819

Merged
lynnagara merged 12 commits intomasterfrom
update-testutils-cell-kwarg
Mar 31, 2026
Merged

ref(cells): Update org creation testutils to pass cell kwarg#111819
lynnagara merged 12 commits intomasterfrom
update-testutils-cell-kwarg

Conversation

@lynnagara
Copy link
Copy Markdown
Member

No description provided.

@lynnagara lynnagara requested a review from a team March 30, 2026 20:01
@lynnagara lynnagara requested a review from a team as a code owner March 30, 2026 20:01
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 30, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Renamed parameter breaks all existing callers using region=
    • I restored backward compatibility by consuming region from kwargs and mapping it to cell when cell is not explicitly provided, preventing invalid ORM kwargs and preserving caller intent.

Create PR

Or push these changes by commenting:

@cursor push 551254e2b7
Preview (551254e2b7)
diff --git a/src/sentry/testutils/factories.py b/src/sentry/testutils/factories.py
--- a/src/sentry/testutils/factories.py
+++ b/src/sentry/testutils/factories.py
@@ -382,6 +382,11 @@
         if not name:
             name = petname.generate(2, " ", letters=10).title()
 
+        # Backwards compatibility for callers still passing region=.
+        region = kwargs.pop("region", None)
+        if cell is None and region is not None:
+            cell = region
+
         with contextlib.ExitStack() as ctx:
             if cell is None or SiloMode.get_current_mode() == SiloMode.MONOLITH:
                 cell_name = get_local_cell().name

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

@lynnagara lynnagara requested review from a team as code owners March 30, 2026 20:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Backend Test Failures

Failures on ac9d2c1 in this run:

tests/sentry/sentry_apps/services/test_app_request.py::TestRegionApp::test_invalid_app_idlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/sentry_apps/services/test_app_request.py:19: in setUp
    self.org = Factories.create_organization(owner=self.user, region="us")
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'
tests/sentry/sentry_apps/services/test_app_request.py::TestRegionApp::test_get_filtered_buffer_requests_for_celllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/sentry_apps/services/test_app_request.py:19: in setUp
    self.org = Factories.create_organization(owner=self.user, region="us")
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'
tests/sentry/sentry_apps/services/test_app_request.py::TestRegionApp::test_get_buffer_requests_for_celllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/sentry_apps/services/test_app_request.py:19: in setUp
    self.org = Factories.create_organization(owner=self.user, region="us")
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'
tests/sentry/synapse/endpoints/test_org_cell_mappings.py::OrgCellMappingsTest::test_get_locale_filterlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/synapse/endpoints/test_org_cell_mappings.py:141: in test_get_locale_filter
    org3 = self.create_organization(region=de_region)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Backend Test Failures

Failures on 300005a in this run:

tests/sentry/synapse/endpoints/test_org_cell_mappings.py::OrgCellMappingsTest::test_get_locale_filterlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/synapse/endpoints/test_org_cell_mappings.py:141: in test_get_locale_filter
    org3 = self.create_organization(region=de_region)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'
tests/sentry/synapse/endpoints/test_org_cell_mappings.py::OrgCellMappingsTest::test_get_multiple_pages_multiple_localeslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/synapse/endpoints/test_org_cell_mappings.py:104: in test_get_multiple_pages_multiple_locales
    org3 = self.create_organization(region=de_region)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:400: in create_organization
    org = Organization.objects.create(name=name, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
.venv/lib/python3.13/site-packages/django/db/models/query.py:663: in create
    obj = self.model(**kwargs)
.venv/lib/python3.13/site-packages/django/db/models/base.py:569: in __init__
    raise TypeError(
E   TypeError: Organization() got unexpected keyword arguments: 'region'

Copy link
Copy Markdown
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures look relevant.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

Backend Test Failures

Failures on ef7745b in this run:

tests/sentry/explore/migrations/test_0007_update_numeric_attrs_to_bools.py::UpdateNumericToBooleanTest::test_migrationlog
tests/sentry/explore/migrations/test_0007_update_numeric_attrs_to_bools.py:16: in setup_before_migration
    span1 = self.create_span(start_ts=before_now(days=0, minutes=10))
src/sentry/testutils/cases.py:3324: in create_span
    organization = self.organization
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exhaustive.py::ExhaustiveTests::test_exhaustive_dirty_pkslog
tests/sentry/backup/test_exhaustive.py:37: in test_exhaustive_dirty_pks
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exhaustive.py::ExhaustiveTests::test_uniquenesslog
tests/sentry/backup/test_exhaustive.py:43: in test_uniqueness
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::ScopingTests::test_config_export_scopinglog
tests/sentry/backup/test_exports.py:318: in test_config_export_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::ScopingTests::test_global_export_scopinglog
tests/sentry/backup/test_exports.py:388: in test_global_export_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::ScopingTests::test_organization_export_scopinglog
tests/sentry/backup/test_exports.py:252: in test_organization_export_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::ScopingTests::test_user_export_scopinglog
tests/sentry/backup/test_exports.py:188: in test_user_export_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::FilteringTests::test_export_filter_orgs_emptylog
tests/sentry/backup/test_exports.py:722: in test_export_filter_orgs_empty
    org_a = self.create_exhaustive_organization("org-a", a, a_b, [a_b_c])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::FilteringTests::test_export_filter_orgs_multiplelog
tests/sentry/backup/test_exports.py:630: in test_export_filter_orgs_multiple
    org_a = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_exports.py::FilteringTests::test_export_filter_orgs_singlelog
tests/sentry/backup/test_exports.py:544: in test_export_filter_orgs_single
    org_a = self.create_exhaustive_organization("org-a", a, a_b, [a_b_c])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::SanitizationTests::test_generate_suffix_for_already_taken_organizationlog
tests/sentry/backup/test_imports.py:287: in test_generate_suffix_for_already_taken_organization
    self.create_organization(name="some-org", owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::SanitizationTests::test_generate_suffix_for_already_taken_organization_with_control_optionlog
tests/sentry/backup/test_imports.py:343: in test_generate_suffix_for_already_taken_organization_with_control_option
    self.test_generate_suffix_for_already_taken_organization()
tests/sentry/backup/test_imports.py:287: in test_generate_suffix_for_already_taken_organization
    self.create_organization(name="some-org", owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::SignalingTests::test_import_signaling_organizationlog
tests/sentry/backup/test_imports.py:731: in test_import_signaling_organization
    self.create_exhaustive_organization("some-org", owner, invited, [member])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::SignalingTests::test_import_signaling_organization_with_control_provisioning_optionlog
tests/sentry/backup/test_imports.py:768: in test_import_signaling_organization_with_control_provisioning_option
    self.test_import_signaling_organization()
tests/sentry/backup/test_imports.py:731: in test_import_signaling_organization
    self.create_exhaustive_organization("some-org", owner, invited, [member])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::ScopingTests::test_config_import_scopinglog
tests/sentry/backup/test_imports.py:859: in test_config_import_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::ScopingTests::test_global_import_scopinglog
tests/sentry/backup/test_imports.py:879: in test_global_import_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::ScopingTests::test_organization_import_scopinglog
tests/sentry/backup/test_imports.py:839: in test_organization_import_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::ScopingTests::test_user_import_scopinglog
tests/sentry/backup/test_imports.py:824: in test_user_import_scoping
    self.create_exhaustive_instance(is_superadmin=True)
src/sentry/testutils/helpers/backups.py:947: in create_exhaustive_instance
    org = self.create_exhaustive_organization(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::DatabaseResetTests::test_persist_existing_models_in_config_scopelog
tests/sentry/backup/test_imports.py:960: in test_persist_existing_models_in_config_scope
    self.create_exhaustive_organization("neworg", owner, user, None)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::DatabaseResetTests::test_persist_existing_models_in_organization_scopelog
tests/sentry/backup/test_imports.py:972: in test_persist_existing_models_in_organization_scope
    self.create_exhaustive_organization("neworg", owner, user, None)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::DatabaseResetTests::test_persist_existing_models_in_user_scopelog
tests/sentry/backup/test_imports.py:948: in test_persist_existing_models_in_user_scope
    self.create_exhaustive_organization("neworg", owner, user, None)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::FilterTests::test_import_filter_orgs_emptylog
tests/sentry/backup/test_imports.py:1318: in test_import_filter_orgs_empty
    self.create_exhaustive_organization("org-a", a, a_b, [a_b_c])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::FilterTests::test_import_filter_orgs_multiplelog
tests/sentry/backup/test_imports.py:1268: in test_import_filter_orgs_multiple
    self.create_exhaustive_organization("org-a", a, a_b, [a_b_c])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::FilterTests::test_import_filter_orgs_singlelog
tests/sentry/backup/test_imports.py:1226: in test_import_filter_orgs_single
    self.create_exhaustive_organization("org-a", a, a_b, [a_b_c])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_data_sourcelog
tests/sentry/backup/test_imports.py:1689: in test_colliding_data_source
    self.create_exhaustive_organization("some-org", owner, invited)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_member_invite_tokenlog
tests/sentry/backup/test_imports.py:1464: in test_colliding_member_invite_token
    org = self.create_organization(name="some-org")
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_monitorlog
tests/sentry/backup/test_imports.py:1487: in test_colliding_monitor
    self.create_exhaustive_organization("some-org", owner, invited)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_org_auth_tokenlog
tests/sentry/backup/test_imports.py:1519: in test_colliding_org_auth_token
    self.create_exhaustive_organization("some-org", owner, invited, [member])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_project_keylog
tests/sentry/backup/test_imports.py:1570: in test_colliding_project_key
    self.create_exhaustive_organization("some-org", owner, invited, [member])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_query_subscriptionlog
tests/sentry/backup/test_imports.py:1612: in test_colliding_query_subscription
    self.create_exhaustive_organization("some-org", owner, invited, [member])
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/helpers/backups.py:445: in create_exhaustive_organization
    org = self.create_organization(name=slug, owner=owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/backup/test_imports.py::CollisionTests::test_colliding_saved_searchlog
tests/sentry/backup/test_imports.py:1657: in test_colliding_saved_search
    self.create_organization("some-org", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/integration/test_sso.py::OrganizationAuthLoginTest::test_sso_auth_requiredlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/integration/test_sso.py:13: in test_sso_auth_required
    organization = self.create_organization(name="foo")
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/integration/test_service.py::IntegrationServiceTest__InControlMode::test_refresh_token_missing_expiration_timelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/integration/test_service.py:142: in test_refresh_token_missing_expiration_time
    integration = self.generate_integration(
tests/integration/test_service.py:21: in generate_integration
    organization=self.organization,
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_organizationmember.py::MemberPermissionTest::test_org_ownerlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_organizationmember.py:7: in setUp
    super().setUp()
tests/sentry/api/bases/test_organization.py:55: in setUp
    self.org = self.create_organization()
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/integration/test_service.py::IntegrationServiceTest::test_refresh_token_missing_expiration_timelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/integration/test_service.py:142: in test_refresh_token_missing_expiration_time
    integration = self.generate_integration(
tests/integration/test_service.py:21: in generate_integration
    organization=self.organization,
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_project.py::ProjectPermissionTest::test_owner_with_team_membershiplog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_project.py:146: in test_owner_with_team_membership
    user=user, organization=self.organization, role="owner", teams=[self.team]
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_organization.py::OrganizationPermissionTest::test_api_key_without_org_accesslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_organization.py:55: in setUp
    self.org = self.create_organization()
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_project.py::ProjectPermissionTest::test_owner_without_team_membershiplog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_project.py:135: in test_owner_without_team_membership
    team = self.create_team(organization=self.organization)
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_organization.py::GetFilterParamsTest::test_paramslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_organization.py:636: in setUp
    self.team_1 = self.create_team(organization=self.org)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
tests/sentry/api/bases/test_organization.py:362: in org
    org = self.create_organization("test", self.owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_project.py::ProjectPermissionNoJoinLeaveTest::test_admin_without_team_membershiplog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_project.py:242: in setUp
    self.organization.flags.allow_joinleave = False
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_team.py::TeamPermissionTest::test_member_with_team_membershiplog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_team.py:14: in setUp
    self.org = self.create_organization()
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py::ErrorCountThresholdCheckTest::test_unordered_timeserieslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py:19: in setUp
    self.project1 = self.create_project(name="foo", organization=self.organization)
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py::ReleaseThresholdTest::test_get_valid_with_environmentlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py:14: in setUp
    organization_id=self.organization.id, name="canary"
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_accept_organization_invite.py::AcceptInviteTest::test_user_has_2falog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_accept_organization_invite.py:34: in setUp
    self.organization = self.create_organization(owner=self.create_user("foo@example.com"))
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_accept_project_transfer.py::AcceptTransferProjectTest::test_non_owner_cannot_transfer_projectlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_accept_project_transfer.py:31: in setUp
    self.from_organization = self.create_organization(owner=self.owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_dif_assemble.py::DifAssembleEndpoint::test_reuses_existing_proguard_file_with_new_debug_idlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_dif_assemble.py:28: in setUp
    self.organization = self.create_organization(owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_email_capture.py::EmailCaptureTest::test_capture_endpoint_disabledlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_email_capture.py:15: in setUp
    self.organization = self.create_organization()
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_event_attachment_details.py::EventAttachmentDetailsPermissionTest::test_superuser_read_accesslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_event_attachment_details.py:209: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_ai_conversations.py::OrganizationAIConversationsEndpointTest::test_query_filterlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_ai_conversations.py:740: in test_query_filter
    self.store_ai_span(
tests/sentry/api/endpoints/test_organization_ai_conversations_base.py:114: in store_ai_span
    span = self.create_span(
src/sentry/testutils/cases.py:3324: in create_span
    organization = self.organization
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_ai_conversation_details.py::OrganizationAIConversationDetailsEndpointTest::test_only_returns_matching_conversationlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_ai_conversation_details.py:320: in test_only_returns_matching_conversation
    self.store_ai_span(
tests/sentry/api/endpoints/test_organization_ai_conversations_base.py:114: in store_ai_span
    span = self.create_span(
src/sentry/testutils/cases.py:3324: in create_span
    organization = self.organization
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_token_details.py::OrganizationAuthTokenDetailsPermissionTest::test_manager_can_putlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_token_details.py:402: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_attribute_mappings.py::OrganizationAttributeMappingsEndpointTest::test_multiple_type_filterlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_attribute_mappings.py:109: in test_multiple_type_filter
    url = reverse(self.endpoint, kwargs={"organization_id_or_slug": self.organization.slug})
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_token_details.py::OrganizationAuthTokenDetailsPermissionTest::test_member_can_getlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_token_details.py:402: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_tokens.py::OrganizationAuthTokenCreateTest::test_deny_token_accesslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_tokens.py:197: in test_deny_token_access
    self.organization.slug,
.venv/lib/python3.13/site-packages/django/utils/functional.py:47: in __get__
    res = instance.__dict__[self.name] = self.func(instance)
src/sentry/testutils/fixtures.py:105: in organization
    return self.create_organization(name="baz", slug="baz", owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_token_details.py::OrganizationAuthTokenDetailsPermissionTest::test_member_cannot_deletelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_token_details.py:402: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_tokens.py::OrganizationAuthTokensPermissionTest::test_manager_can_postlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_tokens.py:209: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_token_details.py::OrganizationAuthTokenDetailsPermissionTest::test_owner_can_deletelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_token_details.py:402: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_invite_request_details.py::OrganizationInviteRequestDeleteTest::test_member_cannot_delete_invite_requestlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_invite_request_details.py:104: in test_member_cannot_delete_invite_request
    self.login_as(user=self.member)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
tests/sentry/api/endpoints/test_organization_invite_request_details.py:30: in member
    return self.create_member(organization=self.org, user=self.create_user(), role="member")
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
tests/sentry/api/endpoints/test_organization_invite_request_details.py:22: in org
    return self.create_organization(owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_auth_token_details.py::OrganizationAuthTokenDetailsPermissionTest::test_owner_can_getlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_auth_token_details.py:402: in setUp
    super().setUp()
src/sentry/testutils/cases.py:863: in setUp
    self.organization = self.create_organization(
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_missing_org_members.py::OrganizationMissingMembersTestCase::test_filters_authors_with_no_external_idlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_missing_org_members.py:20: in setUp
    self.organization = self.create_organization(owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/endpoints/test_organization_onboarding_tasks.py::OrganizationOnboardingTaskEndpointTest::test_mark_completion_seen_as_memberlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/endpoints/test_organization_onboarding_tasks.py:15: in setUp
    self.org = self.create_organization(owner=self.user)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/integration/test_api.py::AuthenticationTest::test_sso_redirect_url_internallog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/integration/test_api.py:17: in setUp
    self.organization = self.create_organization(name="foo")
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_organization.py::GetProjectIdsTest::test_all_accessible_sigil_value_no_open_joinlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_organization.py:382: in setUp
    self.team_1 = self.create_team(organization=self.org)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
tests/sentry/api/bases/test_organization.py:362: in org
    org = self.create_organization("test", self.owner)
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/integration/test_service.py::IntegrationServiceTest__InControlMode::test_missing_installationlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/integration/test_service.py:203: in test_missing_installation
    organization=self.create_organization(owner=self.create_user()),
src/sentry/testutils/fixtures.py:176: in create_organization
    return Factories.create_organization(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
src/sentry/testutils/factories.py:384: in create_organization
    cell = kwargs.pop("region")
E   KeyError: 'region'
tests/sentry/api/bases/test_organization.py::GetProjectIdsTest::test_ids_no_teamslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/api/bases/test_organization.py:382: in setUp
    self.team_1 = self.create_team(organization=self.org)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
tests/sentry/api/bases/test_organization.py:362: in org
    org = self.create_orga

... (truncated due to GitHub comment size limit)

@lynnagara lynnagara requested a review from a team as a code owner March 31, 2026 20:36
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@lynnagara lynnagara merged commit 7abfaf7 into master Mar 31, 2026
107 checks passed
@lynnagara lynnagara deleted the update-testutils-cell-kwarg branch March 31, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants