diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-04-08 16:50:50 -0400 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-04-08 16:50:50 -0400 |
commit | f64e56864dcd316ab1e74b2f5b2ec9462cd1e368 (patch) | |
tree | dbd579d628971dd7bac9e21b2ff358e9504fe9ec /tests/silo_test.py | |
parent | 333f8ea6525b1152f9c11abf38f3e7a0a6f757c0 (diff) |
new method combox.silo.ComboxSilo.node_rem
The method removes information about a file in the category `type_'
where `type_' can be 'file_created', 'file_modified', 'file_removed',
'file_moved'.
Also wrote tests for it :~(
modified: combox/silo.py
modified: tests/silo_test.py
Diffstat (limited to 'tests/silo_test.py')
-rw-r--r-- | tests/silo_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/silo_test.py b/tests/silo_test.py index 067dd51..983ef1b 100644 --- a/tests/silo_test.py +++ b/tests/silo_test.py @@ -198,6 +198,21 @@ class TestSilo(object): assert_equal(2, silo.node_get('file_created', self.LOREM)) + def test_csilo_noderem(self): + """Tests node_rem method in ComboxSilo class + """ + silo = ComboxSilo(self.config, self.silo_lock) + + silo.node_set('file_created', self.LOREM) + silo.node_set('file_created', self.LOREM) + silo.node_set('file_created', self.LOREM) + silo.node_set('file_created', self.LOREM) + assert_equal(4, silo.node_get('file_created', self.LOREM)) + + removed = silo.node_rem('file_created', self.LOREM) + assert_equal(True, removed) + assert_equal(None, silo.node_get('file_created', self.LOREM)) + def teardown(self): """Cleans up things after each test in this class""" |