Skip to content

Commit 2e3fa6b

Browse files
ref(issues): Do not use uptime grouptype as test fixture (#94963)
1 parent ebe1490 commit 2e3fa6b

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

tests/sentry/issues/test_grouptype.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
get_group_types_by_category,
1919
)
2020
from sentry.testutils.cases import TestCase
21-
from sentry.uptime.grouptype import UptimeDomainCheckFailure
2221

2322

2423
class BaseGroupTypeTest(TestCase):
@@ -171,16 +170,24 @@ class TestGroupType(PerformanceGroupTypeDefaults, GroupType):
171170

172171
class GroupRegistryTest(BaseGroupTypeTest):
173172
def test_get_visible(self) -> None:
173+
class UnreleasedGroupType(GroupType):
174+
type_id = 9999
175+
slug = "unreleased_group_type"
176+
description = "Mcok unreleased issue group"
177+
released = False
178+
category = GroupCategory.ERROR.value
179+
category_v2 = GroupCategory.ERROR.value
180+
174181
registry = GroupTypeRegistry()
175-
registry.add(UptimeDomainCheckFailure)
182+
registry.add(UnreleasedGroupType)
176183
registry.add(MetricIssuePOC)
177184
assert registry.get_visible(self.organization) == []
178-
with self.feature(UptimeDomainCheckFailure.build_visible_feature_name()):
179-
assert registry.get_visible(self.organization) == [UptimeDomainCheckFailure]
185+
with self.feature(UnreleasedGroupType.build_visible_feature_name()):
186+
assert registry.get_visible(self.organization) == [UnreleasedGroupType]
180187
registry.add(ErrorGroupType)
181-
with self.feature(UptimeDomainCheckFailure.build_visible_feature_name()):
188+
with self.feature(UnreleasedGroupType.build_visible_feature_name()):
182189
assert set(registry.get_visible(self.organization)) == {
183-
UptimeDomainCheckFailure,
190+
UnreleasedGroupType,
184191
ErrorGroupType,
185192
}
186193

0 commit comments

Comments
 (0)