Rewrite test integration test

to assert two runs with the same cache_path return the same servers
(after writing and reading from cache).
This commit is contained in:
Thor77 2018-02-01 16:15:29 +01:00
parent 9c2daf630c
commit ab99c5f64c
1 changed files with 7 additions and 2 deletions

View File

@ -66,5 +66,10 @@ def test_cache_needs_parsing(cache, tmpdir):
# INTEGRATION
def test_cache_integration(cache_path):
assert next(parse_logs(testlog_path, online_dc=False)) == \
next(parse_logs(testlog_path, online_dc=False, cache_path=cache_path))
first_run = list(parse_logs(
testlog_path, online_dc=False, cache_path=cache_path
))
second_run = list(parse_logs(
testlog_path, online_dc=False, cache_path=cache_path
))
assert first_run == second_run