def test_clear_encountering_missing_key(cache, mocker):
    'Clear missing key.'
    mocker.patch.object(cache, 'keys', (lambda : ['missing']))
    assert (cache.keys() == ['missing'])
    cache.clear()
    assert (cache.keys() == ['missing'])
Clear missing key.
def test_clear_encountering_missing_key(cache, mocker):
    
    mocker.patch.object(cache, 'keys', (lambda : ['missing']))
    assert (cache.keys() == ['missing'])
    cache.clear()
    assert (cache.keys() == ['missing'])