Skip to content

Commit a5b912d

Browse files
committed
adjust tests
1 parent 3fc8f9f commit a5b912d

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/sentry/integrations/example/integration.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@ class ExampleIntegrationProvider(IntegrationProvider):
220220
IntegrationFeatures.STACKTRACE_LINK,
221221
]
222222
)
223-
cell_restricted = False
224-
225-
@property
226-
def is_cell_restricted(self) -> bool:
227-
return self.cell_restricted
228223

229224
def get_pipeline_views(self) -> Sequence[PipelineView[IntegrationPipeline]]:
230225
return [ExampleSetupView()]

tests/sentry/integrations/test_pipeline.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _modify_provider(self):
7575
yield
7676

7777
def _setup_cell_restriction(self):
78-
self.provider.cell_restricted = True
78+
setattr(self.provider, "is_cell_restricted", True)
7979
na_orgs = [
8080
self.create_organization(name="na_org"),
8181
self.create_organization(name="na_org_2"),
@@ -177,11 +177,9 @@ def test_is_violating_cell_restriction_failure(self, *args) -> None:
177177
response = self.pipeline.finish_pipeline()
178178
assert isinstance(response, HttpResponse)
179179
error_message = "This integration has already been installed on another Sentry organization which resides in a different cell. Installation could not be completed."
180-
assert error_message in response.content.decode()
181-
182180
if SiloMode.get_current_mode() == SiloMode.MONOLITH:
183181
assert error_message not in response.content.decode()
184-
if SiloMode.get_current_mode() == SiloMode.CONTROL:
182+
else:
185183
assert error_message in response.content.decode()
186184

187185
def test_aliased_integration_key(self, *args) -> None:
@@ -706,7 +704,7 @@ def _modify_provider(self):
706704
yield
707705

708706
def _setup_cell_restriction(self):
709-
self.provider.cell_restricted = True
707+
setattr(self.provider, "is_cell_restricted", True)
710708
na_orgs = [
711709
self.create_organization(name="na_org"),
712710
self.create_organization(name="na_org_2"),

0 commit comments

Comments
 (0)