def test_replace_params_override_default(self, __init__): tohsaka = Tohsaka('test', {}) tohsaka.config = deepcopy({ **self.BASE_PARAMS_DEF, **self.BASE_SPELL_CONFIG }) base_params = self.BASE_PARAMS base_params['param4'] = 'param4' tohsaka._replace_params(tohsaka.config['spell']['options'], base_params) options = tohsaka.config.get('spell').get('options') assert options.get('config5') == 'param4'
def test_replace_params(self, __init__): tohsaka = Tohsaka('test', {}) tohsaka.config = deepcopy({ **self.BASE_PARAMS_DEF, **self.BASE_SPELL_CONFIG }) tohsaka._replace_params(tohsaka.config['spell']['options'], self.BASE_PARAMS) options = tohsaka.config.get('spell').get('options') assert options.get('config1') == 'no param' assert options.get('config2') == '1marap' assert options.get('config3') == '2marap123' assert options.get('config4') == '1marap4562marap' assert options.get('config5') == '4marap'