mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 21:44:11 -04:00
Fix tests
This commit is contained in:
@@ -5,7 +5,7 @@ from freezegun import freeze_time
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
def test_form_contains_next_24h():
|
||||
def test_form_contains_next_24h(app_):
|
||||
|
||||
choices = ChooseTimeForm().scheduled_for.choices
|
||||
|
||||
@@ -34,12 +34,12 @@ def test_form_contains_next_24h():
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
def test_form_defaults_to_now(client):
|
||||
def test_form_defaults_to_now(app_):
|
||||
assert ChooseTimeForm().scheduled_for.data == ''
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
def test_form_contains_next_three_days():
|
||||
def test_form_contains_next_three_days(app_):
|
||||
assert ChooseTimeForm().scheduled_for.categories == [
|
||||
'Later today', 'Tomorrow', 'Sunday', 'Monday'
|
||||
]
|
||||
|
||||
@@ -16,6 +16,8 @@ def notify_config():
|
||||
'admin_client_secret': 'admin client secret',
|
||||
'secret_key': 'secret key',
|
||||
'dangerous_salt': 'dangerous salt',
|
||||
'route_secret_key_1': 'key 1',
|
||||
'route_secret_key_2': 'key 2',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +120,8 @@ def test_notify_config():
|
||||
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
|
||||
assert os.environ['SECRET_KEY'] == 'secret key'
|
||||
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
|
||||
assert os.environ['ROUTE_SECRET_KEY_1'] == 'key 1'
|
||||
assert os.environ['ROUTE_SECRET_KEY_2'] == 'key 2'
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
|
||||
|
||||
@@ -32,7 +32,7 @@ from notifications_utils.url_safe_token import generate_token
|
||||
import json
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
@pytest.fixture
|
||||
def app_(request):
|
||||
app = Flask('app')
|
||||
create_app(app)
|
||||
|
||||
Reference in New Issue
Block a user