| Conditions | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # pylint: disable=missing-docstring,unused-variable,unused-argument,expression-not-assigned,singleton-comparison |
||
| 25 | def describe_match(): |
||
| 26 | |||
| 27 | def it_hits_with_existing_data(cache): |
||
| 28 | cache._data['abc'] = 123 |
||
| 29 | |||
| 30 | expect(cache.match('abc', 123)) == True |
||
| 31 | |||
| 32 | def it_misses_with_no_data(cache): |
||
| 33 | cache._data.pop('abc', None) |
||
| 34 | |||
| 35 | expect(cache.match('abc', 123)) == False |
||
| 36 | |||
| 37 | def it_caches_requests(cache): |
||
| 38 | cache._data.pop('abc', None) |
||
| 39 | cache.match('abc', 123) |
||
| 40 | |||
| 41 | expect(cache.match('abc', 123)) == True |
||
| 42 |