Fix test of existing metadata files

In test_cache_existing_metadata_file() we are now getting the correct
path to the metadata files, thus making the test useful. This was the
last missing test, the cache is now 100% covered (issue#999).
This commit is contained in:
Lamar Pavel 2015-11-05 23:08:38 +01:00
parent baa3bd18a0
commit cbb9fd203a

View File

@ -136,10 +136,9 @@ def test_cache_existing_metadata_file(config_stub, tmpdir):
disk_cache.insert(device)
disk_cache.updateMetaData(metadata)
# TODO: Get path and name of file that device has been writing to
#fname = str(tmpdir) + "/cache_" + url + ".cache"
#assert disk_cache.fileMetaData(fname) == metadata
assert True
files = list(tmpdir.visit(fil=lambda path: path.isfile()))
assert len(files) == 1
assert disk_cache.fileMetaData(str(files[0])) == metadata
def test_cache_nonexistent_metadata_file(config_stub, tmpdir):