|
18 | 18 | get_group_types_by_category,
|
19 | 19 | )
|
20 | 20 | from sentry.testutils.cases import TestCase
|
21 |
| -from sentry.uptime.grouptype import UptimeDomainCheckFailure |
22 | 21 |
|
23 | 22 |
|
24 | 23 | class BaseGroupTypeTest(TestCase):
|
@@ -171,16 +170,24 @@ class TestGroupType(PerformanceGroupTypeDefaults, GroupType):
|
171 | 170 |
|
172 | 171 | class GroupRegistryTest(BaseGroupTypeTest):
|
173 | 172 | 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 | + |
174 | 181 | registry = GroupTypeRegistry()
|
175 |
| - registry.add(UptimeDomainCheckFailure) |
| 182 | + registry.add(UnreleasedGroupType) |
176 | 183 | registry.add(MetricIssuePOC)
|
177 | 184 | 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] |
180 | 187 | registry.add(ErrorGroupType)
|
181 |
| - with self.feature(UptimeDomainCheckFailure.build_visible_feature_name()): |
| 188 | + with self.feature(UnreleasedGroupType.build_visible_feature_name()): |
182 | 189 | assert set(registry.get_visible(self.organization)) == {
|
183 |
| - UptimeDomainCheckFailure, |
| 190 | + UnreleasedGroupType, |
184 | 191 | ErrorGroupType,
|
185 | 192 | }
|
186 | 193 |
|
|
0 commit comments