test: During testing add debug_feature_flags so object behind can be tested

ref: #707
This commit is contained in:
2025-04-04 14:07:18 +09:30
parent 5b0d9d8d81
commit ca0bb96808
2 changed files with 12 additions and 2 deletions

View File

@ -500,7 +500,10 @@ if FEATURE_FLAGGING_ENABLED:
'over_rides': FEATURE_FLAG_OVERRIDES 'over_rides': FEATURE_FLAG_OVERRIDES
}) })
if DEBUG:
if DEBUG or RUNNING_TESTS:
feature_flag.update({ 'disable_downloading': True, })
debug_feature_flags = [ debug_feature_flags = [
{ {

View File

@ -112,6 +112,10 @@ class CenturionFeatureFlagging:
self._disable_downloading = disable_downloading self._disable_downloading = disable_downloading
if self._disable_downloading:
self._feature_flags = {}
_over_rides: dict = {} _over_rides: dict = {}
if over_rides: if over_rides:
@ -183,7 +187,10 @@ class CenturionFeatureFlagging:
Returns: Returns:
dict: A complete Feature Flag. dict: A complete Feature Flag.
""" """
if self._feature_flags is None: if(
self._feature_flags is None
and self._over_rides.get(key, None) is None
):
print('Feature Flagging has not been completly initialized.') print('Feature Flagging has not been completly initialized.')
print(' please ensure that the feature flags have been downloaded.') print(' please ensure that the feature flags have been downloaded.')