-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
I've simple conf.py
class RatesConf(AppConf):
# Disabling this will be useful for testing purposes
PREMIUM_AUTO_RECALCULATION_ENABLED = True
and I'm using
from conf import RatesConf
...
@receiver(quote_rates_data_changed)
def on_quote_rates_data_changed(signal, sender, quote, **kwargs):
if RatesConf.PREMIUM_AUTO_RECALCULATION_ENABLED:
...
I set it to False
for all tests except when I need to test this place. I'm trying to override it with django's override_settings
decorator:
@override_settings(RATES_PREMIUM_AUTO_RECALCULATION_ENABLED=True)
class RatesSignalsTestCase(TestCase):
def test_quote_rates_data_changed_signal_run_recalculation(self):
print RatesConf.PREMIUM_AUTO_RECALCULATION_ENABLED
And I'm getting False
Metadata
Metadata
Assignees
Labels
No labels