diff --git a/tests/test_CacheWriter.py b/tests/test_CacheWriter.py index 4023a4e..47a5ccd 100644 --- a/tests/test_CacheWriter.py +++ b/tests/test_CacheWriter.py @@ -11,7 +11,7 @@ import oxrlib.errors CACHE_PATH = relpath('writecache') HISTORICAL_PATTERN = '{date}_{base}_cache.json' -class TestCacheFile(oxrlib.cache.WriteCacheFile): +class FakeCacheFile(oxrlib.cache.WriteCacheFile): def __init__(self, path, *args, **kwargs): self.path = path assert args[0].startswith('w') @@ -31,7 +31,7 @@ class FakeRate: @pytest.fixture def dummycache(): - cache = oxrlib.cache.CacheWriter(CACHE_PATH, file_class=TestCacheFile) + cache = oxrlib.cache.CacheWriter(CACHE_PATH, file_class=FakeCacheFile) cache.setup(historical=HISTORICAL_PATTERN) return cache @@ -44,4 +44,4 @@ def test_cache_success(dummycache, any_date): def test_save_rate(dummycache, any_date): rate = FakeRate(any_date, 'USD') dummycache.save_rate(rate) - assert TestCacheFile.last_file.last_value == json.dumps(rate.serialize()) + assert FakeCacheFile.last_file.last_value == json.dumps(rate.serialize())