Files @ 8d3816a8fd87
Branch filter:

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

Brett Smith
config: Add Config.rt_credentials method.

This loads settings from the same environment variables and ~/.rtrc
file as the rt CLI.

Note that it does *not* support RTCONFIG and the config file
searching, because right now that seems like more work for more
trouble to me.
import os

import pytest

from . import testutil

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