Files @ eba27c16ae78
Branch filter:

Location: NPO-Accounting/oxrlib/tests/__init__.py

Brett Smith
cache: Refactor out CacheBase from FileCache.

Now we can implement CacheWriter from the same base.
import datetime
import pathlib
import random

import pytest

TEST_DIR = pathlib.Path(__file__).parent

def relpath(*parts):
    return TEST_DIR / pathlib.Path(*parts)

@pytest.fixture
def any_date():
    return datetime.date.today() - datetime.timedelta(days=730 - random.randint(0, 365))