

def test_setdefault_with_previous_value(self):
    config = Configuration({
        'foo': 1,
        'nested': {
            'foo': 2,
        },
    })
    config.setdefault('foo', 0)
    self.assertEqual(config.get('foo'), 1)
    config.setdefault('nested.foo', 0)
    self.assertEqual(config.get('nested.foo'), 2)

dataset/ETHPy150Open deliveryhero/lymph/lymph/tests/test_config.py ConfigurationTests.test_setdefault_with_previous_value/original