

def set_sending_stats(self, value):
    mn_settings = MasterNodeSettings.get_one()
    mn_settings.settings = dict_merge(mn_settings.settings, {
        'statistics': {
            'user_choice_saved': {
                'value': True,
            },
            'send_anonymous_statistic': {
                'value': value,
            },
        },
    })
    self.db.flush()

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py BaseMasterNodeSettignsTest.set_sending_stats/original