Files @ bbd99e96c0d4
Branch filter:

Location: NPO-Accounting/conservancy_beancount/tests/conftest.py

Brett Smith
plugin: Don't check payable documentation for now.

I believe we still want this in principle, but we're not currently enforcing
it the way I thought we were, and we very regularly write Payables without
this supporting documentation (for trip reimbursement, regular service fees,
etc.). Enforcing this now would be way too noisy in the books, we need to
devise a separate plan to enforce this if we want it.
import os

import pytest

from . import testutil

@pytest.fixture(scope='session', autouse=True)
def clean_environment(tmpdir_factory):
    config_path_s = str(testutil.test_path('userconfig'))
    os.environ.pop('RTAUTH', None)
    os.environ.pop('RTPASSWD', None)
    os.environ.pop('RTSERVER', None)
    os.environ.pop('RTUSER', None)
    os.environ['CONSERVANCY_REPOSITORY'] = str(testutil.test_path('repository'))
    os.environ['HOME'] = config_path_s
    os.environ['XDG_CACHE_HOME'] = str(tmpdir_factory.mktemp('.cache'))
    os.environ['XDG_CONFIG_HOME'] = config_path_s