'Test with an existent CACHEDIR.TAG.'

def test_existent_cache_dir_tag(self, tmpdir, mocker, monkeypatch):

    monkeypatch.setattr(standarddir, 'cache', (lambda : str(tmpdir)))
    mocker.patch('builtins.open', side_effect=AssertionError)
    m = mocker.patch('qutebrowser.utils.standarddir.os')
    m.path.join.side_effect = os.path.join
    m.path.exists.return_value = True
    standarddir._init_cachedir_tag()
    assert (not tmpdir.listdir())
    m.path.exists.assert_called_with(str((tmpdir / 'CACHEDIR.TAG')))
