From ab99c5f64c1be67ebd11ab90e99646fce6e88c37 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Thu, 1 Feb 2018 16:15:29 +0100 Subject: [PATCH] Rewrite test integration test to assert two runs with the same cache_path return the same servers (after writing and reading from cache). --- tsstats/tests/test_cache.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tsstats/tests/test_cache.py b/tsstats/tests/test_cache.py index 0c0bf70..d627321 100644 --- a/tsstats/tests/test_cache.py +++ b/tsstats/tests/test_cache.py @@ -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