'When we have a qutebrowser/qutebrowser subfolder, clean it up.'

def test_deleting_empty_dirs(self, monkeypatch, tmpdir):

    old_data = (((tmpdir / 'data') / 'qutebrowser') / 'qutebrowser')
    old_cache = (((tmpdir / 'cache') / 'qutebrowser') / 'qutebrowser')
    locations = {QStandardPaths.DataLocation: str(old_data), QStandardPaths.CacheLocation: str(old_cache)}
    monkeypatch.setattr(standarddir.QStandardPaths, 'writableLocation', locations.get)
    old_data_file = (((old_data / 'QtWebEngine') / 'Default') / 'datafile')
    old_cache_file = (((old_cache / 'QtWebEngine') / 'Default') / 'cachefile')
    old_data_file.ensure()
    old_cache_file.ensure()
    standarddir._move_webengine_data()
    assert (not (((tmpdir / 'data') / 'qutebrowser') / 'qutebrowser').exists())
    assert (not (((tmpdir / 'cache') / 'qutebrowser') / 'qutebrowser').exists())
