'Overrides the active value for the given switch for the duration of this
contextmanager.
Note: The value is overridden in the request cache AND in the model.'

@contextmanager
def override(self, switch_name, active=True):

    previous_active = self.is_enabled(switch_name)
    try:
        self.override_for_request(switch_name, active)
        with self.override_in_model(switch_name, active):
            (yield)
    finally:
        self.override_for_request(switch_name, previous_active)
