summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-09-07 23:02:26 +0000
committerPatrick Maia <pmaia@thoughtworks.com>2014-09-07 23:02:26 +0000
commiteca2d8db9fa967b4cad39611fe229e2f9421c9fe (patch)
tree0a47d9ed2d52b4271937ace738b2a502bb5a4020 /service/test
parent733f2b7d6c76ac917720a4b4874c8165e8f34f5a (diff)
#51 - adds TagIndex.remove method
Diffstat (limited to 'service/test')
-rw-r--r--service/test/adapter/tag_index_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/service/test/adapter/tag_index_test.py b/service/test/adapter/tag_index_test.py
index 525bf0d6..7667e8e2 100644
--- a/service/test/adapter/tag_index_test.py
+++ b/service/test/adapter/tag_index_test.py
@@ -68,3 +68,11 @@ class TestTagIndex(unittest.TestCase):
def test_empty_returns_false_if_there_are_values(self):
self.tag_index.set(Tag('tag'))
self.assertFalse(self.tag_index.empty())
+
+ def test_remove_deletes_the_tag_with_the_given_key_from_the_index(self):
+ self.tag_index.set(Tag('tag'))
+ self.tag_index.remove('tag')
+ self.assertEquals(None, self.tag_index.get('tag'))
+
+ def test_remove_does_not_raises_exception_if_key_is_not_present(self):
+ self.tag_index.remove('not_there')