def test_delete_non_existing_key(): dictionary = {'key': 'value'} patcher = Patcher(dictionary) with pytest.raises(exceptions.KeyNotFoundException): patcher.delete('non-existing')
def test_delete_non_existing_key(): dictionary = {'key': 'value'} patcher = Patcher(dictionary) with pytest.raises(exceptions.KeyNotFoundException): patcher.delete('non-existing')
def test_delete(): dictionary = {'key1': 'value1', 'key2': 'value2'} expected_dictionary = {'key2': 'value2'} patcher = Patcher(dictionary) dictionary = patcher.delete('key1').finish() assert expected_dictionary == dictionary
def test_delete_complex_key(): dictionary = {'key1': {'key2': 'value1', 'key3': 'value2'}} expected_dictionary = {'key1': {'key2': 'value1'}} patcher = Patcher(dictionary) dictionary = patcher.delete('key1:key3').finish() assert expected_dictionary == dictionary
def test_delete(): dictionary = {'key1': 'value1', 'key2': 'value2'} expected_dictionary = {'key2': 'value2'} patcher = Patcher(dictionary) dictionary = patcher.delete('key1').finish() assert expected_dictionary == dictionary
def test_delete_complex_key(): dictionary = { 'key1': { 'key2': 'value1', 'key3': 'value2' } } expected_dictionary = { 'key1': { 'key2': 'value1' } } patcher = Patcher(dictionary) dictionary = patcher.delete('key1:key3').finish() assert expected_dictionary == dictionary