mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-07 21:52:00 +00:00
Add a test for TreeCache.__contains__
This commit is contained in:
parent
5c79ef9396
commit
7641a90c34
@ -61,6 +61,9 @@ class CounterMetricTestCase(unittest.TestCase):
|
|||||||
'vector{method="PUT"} 1',
|
'vector{method="PUT"} 1',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Check that passing too few values errors
|
||||||
|
self.assertRaises(ValueError, counter.inc)
|
||||||
|
|
||||||
|
|
||||||
class CallbackMetricTestCase(unittest.TestCase):
|
class CallbackMetricTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
@ -77,3 +77,9 @@ class TreeCacheTestCase(unittest.TestCase):
|
|||||||
cache[("b",)] = "B"
|
cache[("b",)] = "B"
|
||||||
cache.clear()
|
cache.clear()
|
||||||
self.assertEquals(len(cache), 0)
|
self.assertEquals(len(cache), 0)
|
||||||
|
|
||||||
|
def test_contains(self):
|
||||||
|
cache = TreeCache()
|
||||||
|
cache[("a",)] = "A"
|
||||||
|
self.assertTrue(("a",) in cache)
|
||||||
|
self.assertFalse(("b",) in cache)
|
||||||
|
Loading…
Reference in New Issue
Block a user