()
| 22 | |
| 23 | |
| 24 | async def test_cache_on(): |
| 25 | log = [] |
| 26 | |
| 27 | class MySuggester(Suggester): |
| 28 | async def get_suggestion(self, value: str): |
| 29 | log.append(value) |
| 30 | return value |
| 31 | |
| 32 | suggester = MySuggester(use_cache=True) |
| 33 | await suggester._get_suggestion(DOMNode(), "hello") |
| 34 | assert log == ["hello"] |
| 35 | await suggester._get_suggestion(DOMNode(), "hello") |
| 36 | assert log == ["hello"] |
| 37 | |
| 38 | |
| 39 | async def test_cache_off(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…