Run API on Paas

This commit is contained in:
bandesz
2016-12-08 12:12:45 +00:00
parent d759842adc
commit fd66fbd719
29 changed files with 703 additions and 44 deletions

View File

@@ -75,9 +75,16 @@ def notify_db_session(notify_db):
notify_db.session.commit()
@pytest.fixture(scope='function')
def os_environ(mocker):
mocker.patch('os.environ', {})
@pytest.fixture
def os_environ():
"""
clear os.environ, and restore it after the test runs
"""
# for use whenever you expect code to edit environment variables
old_env = os.environ.copy()
os.environ = {}
yield
os.environ = old_env
@pytest.fixture(scope='function')