Skip to content

Commit 68dfeb8

Browse files
authored
🔧 chore: delete apply_feeature_flag_on_cls (#96778)
1 parent 3810670 commit 68dfeb8

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/sentry/testutils/helpers/features.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
RpcUserOrganizationContext,
1919
)
2020

21-
__all__ = ("Feature", "with_feature", "apply_feature_flag_on_cls")
21+
__all__ = ("Feature", "with_feature")
2222

2323

2424
logger = logging.getLogger(__name__)
@@ -225,18 +225,3 @@ def with_feature(names: str | Iterable[str] | dict[str, bool]):
225225
"""
226226

227227
return FeatureContextManagerOrDecorator(names)
228-
229-
230-
def apply_feature_flag_on_cls(feature_flag):
231-
def decorate(cls):
232-
def _feature_fixture(self: object) -> Generator[None]:
233-
with Feature(feature_flag):
234-
yield
235-
236-
name = f"{_feature_fixture.__name__}[{feature_flag}]"
237-
_feature_fixture.__name__ = name
238-
fixture = pytest.fixture(scope="class", autouse=True)(_feature_fixture)
239-
setattr(cls, name, fixture)
240-
return cls
241-
242-
return decorate

0 commit comments

Comments
 (0)