Example #1
0
 def test_contains(self):
     bloom_filter = BloomFilter()
     bloom_filter.insert("hello")
     self.assertTrue(bloom_filter.contains("hello"), 'filter should contain "hello"')
Example #2
0
 def test_does_not_contains(self):
     bloom_filter = BloomFilter()
     bloom_filter.insert("world")
     self.assertFalse(bloom_filter.contains("hello"), 'filter should not contain "hello"')