tests/clear.py
raw| 1 | from conftest import TestData |
| 2 | |
| 3 | |
| 4 | class ClearTests(TestData): |
| 5 | """Tests for the optional 'clear' method specified by BaseCache""" |
| 6 | |
| 7 | def test_clear(self): |
| 8 | cache = self.cache_factory() |
| 9 | assert cache.set_many(self.sample_pairs) |
| 10 | assert cache.clear() |
| 11 | assert not any(cache.get_many(*self.sample_pairs)) |