Files @ 5140ca64f6d2
Branch filter:

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

Brett Smith
tests: Clean the environment before running tests.

As we start reading more sensitive user configuration (like RT credentials),
this fixture makes it simpler to ensure that the tests never read the user's
real configuration, which could lead to problems like passwords in tracebacks.
1
2
3
4
5
6
7
8
9
import os

import pytest

from . import testutil

@pytest.fixture(scope='session', autouse=True)
def clean_environment():
    os.environ.pop('CONSERVANCY_REPOSITORY', None)