File size: 291 Bytes
4bc63c7
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from cache import expiry, mark, memo, touch

def test_memo():
    assert memo([('a',), ('b',)]) == ['a', 'b']

def test_expiry():
    assert expiry(2) == 172800

def test_touch():
    assert touch({'warm': True, 'key': 'k'}) == 'k'

def test_mark():
    assert mark({'key': 'z'}) == 'key z'