Skip to content
Snippets Groups Projects
Commit 4d14655c authored by Mark Haines's avatar Mark Haines
Browse files

Merge pull request #594 from matrix-org/markjh/coverage

Add a test for TreeCache.__contains__
parents c43609e0 7641a90c
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,9 @@ class CounterMetricTestCase(unittest.TestCase):
'vector{method="PUT"} 1',
])
# Check that passing too few values errors
self.assertRaises(ValueError, counter.inc)
class CallbackMetricTestCase(unittest.TestCase):
......
......@@ -77,3 +77,9 @@ class TreeCacheTestCase(unittest.TestCase):
cache[("b",)] = "B"
cache.clear()
self.assertEquals(len(cache), 0)
def test_contains(self):
cache = TreeCache()
cache[("a",)] = "A"
self.assertTrue(("a",) in cache)
self.assertFalse(("b",) in cache)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment