Exemple #1
0
 def test_delete_invalid_key(self, capsys):
     DataBag._data = {'foo': {'a': {}}}
     assert DataBag.delete('foo.a.baz') is -1
Exemple #2
0
 def test_delete_key(self):
     DataBag._data = {'foo': {'a': 42, 'b': 2}}
     assert DataBag.delete('foo.a') is 1
     assert DataBag._data == {'foo': {'b': 2}}