Conditions | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | # pylint: disable=missing-docstring,unused-variable,unused-argument,expression-not-assigned,singleton-comparison |
||
52 | def describe_get(): |
||
53 | |||
54 | def it_hits_with_existing_data(cache_empty): |
||
55 | cache = cache_empty |
||
56 | cache.set(("url", {}), "existing") |
||
57 | |||
58 | expect(cache.get(("url", {}))) == "existing" |
||
59 | |||
60 | def it_misses_with_no_data(cache_empty): |
||
61 | expect(cache_empty.get(("url", {}))) == None |
||
62 | |||
63 | def it_returns_the_default_on_miss(cache_empty): |
||
64 | expect(cache_empty.get("foo", 42)) == 42 |
||
65 |