mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-28 11:49:42 -04:00
Update config
Source the configuration from an environment file, this way it is similar to how the aws environment works
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import pytest
|
||||
import mock
|
||||
import os
|
||||
|
||||
import boto3
|
||||
from config import configs
|
||||
import mock
|
||||
import pytest
|
||||
from alembic.command import upgrade
|
||||
from alembic.config import Config
|
||||
from flask.ext.migrate import Migrate, MigrateCommand
|
||||
from flask.ext.script import Manager
|
||||
from sqlalchemy.schema import MetaData
|
||||
|
||||
from app import create_app, db
|
||||
from app import models
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def notify_api(request):
|
||||
app = create_app('test')
|
||||
app = create_app()
|
||||
ctx = app.app_context()
|
||||
ctx.push()
|
||||
|
||||
@@ -59,12 +59,6 @@ def notify_db_session(request):
|
||||
request.addfinalizer(teardown)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def notify_config(notify_api):
|
||||
notify_api.config['NOTIFY_API_ENVIRONMENT'] = 'test'
|
||||
notify_api.config.from_object(configs['test'])
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def os_environ(request):
|
||||
env_patch = mock.patch('os.environ', {})
|
||||
|
||||
Reference in New Issue
Block a user