Skip to content

Commit 433f3d2

Browse files
committed
🧪 test: remove waiver tests
1 parent 1816b26 commit 433f3d2

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed
Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
from datetime import datetime, timezone
2-
31
from sentry.data_secrecy.data_secrecy_logic import should_allow_superuser_access
4-
from sentry.data_secrecy.models.datasecrecywaiver import DataSecrecyWaiver
52
from sentry.organizations.services.organization import (
63
RpcOrganization,
74
RpcOrganizationMember,
85
RpcUserOrganizationContext,
96
)
10-
from sentry.silo.base import SiloMode
117
from sentry.testutils.cases import TestCase
12-
from sentry.testutils.helpers import with_feature
13-
from sentry.testutils.helpers.datetime import freeze_time
14-
from sentry.testutils.silo import all_silo_test, assume_test_silo_mode, create_test_regions
8+
from sentry.testutils.silo import all_silo_test, create_test_regions
159

1610

1711
@all_silo_test(regions=create_test_regions("us"))
@@ -46,35 +40,3 @@ def test_bit_flag_disabled(self):
4640
self.organization.flags.prevent_superuser_access = False
4741
assert should_allow_superuser_access(self.organization) is True
4842
assert should_allow_superuser_access(self.rpc_context) is True
49-
50-
@with_feature("organizations:data-secrecy")
51-
def test_no_waiver_exists(self):
52-
with self.settings(SENTRY_SELF_HOSTED=False):
53-
assert should_allow_superuser_access(self.organization) is False
54-
assert should_allow_superuser_access(self.rpc_context) is False
55-
56-
@freeze_time(datetime(2024, 7, 18, 0, 0, 0, tzinfo=timezone.utc))
57-
@with_feature("organizations:data-secrecy")
58-
def test_waiver_expired(self):
59-
with assume_test_silo_mode(SiloMode.REGION):
60-
DataSecrecyWaiver.objects.create(
61-
organization=self.organization,
62-
access_start=datetime(2024, 7, 17, 0, 0, 0, tzinfo=timezone.utc),
63-
access_end=datetime(2024, 7, 17, 23, 59, 59, tzinfo=timezone.utc),
64-
)
65-
with self.settings(SENTRY_SELF_HOSTED=False):
66-
assert should_allow_superuser_access(self.organization) is False
67-
assert should_allow_superuser_access(self.rpc_context) is False
68-
69-
@freeze_time(datetime(2024, 7, 18, 0, 0, 0, tzinfo=timezone.utc))
70-
@with_feature("organizations:data-secrecy")
71-
def test_waiver_active(self):
72-
with assume_test_silo_mode(SiloMode.REGION):
73-
DataSecrecyWaiver.objects.create(
74-
organization=self.organization,
75-
access_start=datetime(2024, 7, 18, 0, 0, 0, tzinfo=timezone.utc),
76-
access_end=datetime(2024, 7, 19, 0, 0, 0, tzinfo=timezone.utc),
77-
)
78-
with self.settings(SENTRY_SELF_HOSTED=False):
79-
assert should_allow_superuser_access(self.organization) is True
80-
assert should_allow_superuser_access(self.rpc_context) is True

0 commit comments

Comments
 (0)