tests/has.py
raw| 1 | from conftest import TestData |
| 2 | |
| 3 | |
| 4 | class HasTests(TestData): |
| 5 | """Tests for the optional 'has' method specified by BaseCache""" |
| 6 | |
| 7 | def test_has(self): |
| 8 | cache = self.cache_factory() |
| 9 | assert cache.set_many(self.sample_pairs) |
| 10 | for k in self.sample_pairs: |
| 11 | assert cache.has(k) |
| 12 | assert not cache.has("unknown") |