'Test creating a new CACHEDIR.TAG.'

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

    monkeypatch.setattr(standarddir, 'cache', (lambda : str(tmpdir)))
    standarddir._init_cachedir_tag()
    assert (tmpdir.listdir() == [(tmpdir / 'CACHEDIR.TAG')])
    data = (tmpdir / 'CACHEDIR.TAG').read_text('utf-8')
    assert (data == textwrap.dedent('\n                                                Signature:    8a477f597d28d172789f06886806bc55\n                                                #    This    file    is    a    cache    directory    tag    created    by    qutebrowser.\n                                                #    For    information    about    cache    directory    tags,    see:\n                                                #        http://www.brynosaurus.com/cachedir/\n                                ').lstrip())
