def test_wrap_settings(): fn = lambda _, settings: settings assert wrap_settings({'key': 'val'})(fn)(None, Settings({})) \ == {'key': 'val'} assert wrap_settings({'key': 'new-val'})(fn)(None, Settings({'key': 'val'})) == { 'key': 'new-val' }
def test_wrap_settings(override, old, new): fn = lambda _, settings: settings assert wrap_settings(override)(fn)(None, Settings(old)) == new
def test_wrap_settings(): fn = lambda _, settings: settings assert wrap_settings({'key': 'val'})(fn)(None, Settings({})) \ == {'key': 'val'} assert wrap_settings({'key': 'new-val'})(fn)( None, Settings({'key': 'val'})) == {'key': 'new-val'}