mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 03:58:25 -04:00
Merge pull request #1294 from alphagov/dont-hit-template-preview-in-tests
Don’t hit template preview app when running tests
This commit is contained in:
@@ -98,6 +98,7 @@ class Test(Development):
|
|||||||
WTF_CSRF_ENABLED = False
|
WTF_CSRF_ENABLED = False
|
||||||
CSV_UPLOAD_BUCKET_NAME = 'test-notifications-csv-upload'
|
CSV_UPLOAD_BUCKET_NAME = 'test-notifications-csv-upload'
|
||||||
NOTIFY_ENVIRONMENT = 'test'
|
NOTIFY_ENVIRONMENT = 'test'
|
||||||
|
TEMPLATE_PREVIEW_API_HOST = 'http://localhost:9999'
|
||||||
|
|
||||||
|
|
||||||
class Preview(Config):
|
class Preview(Config):
|
||||||
|
|||||||
@@ -29,15 +29,15 @@ def test_from_utils_template_calls_through(
|
|||||||
@pytest.mark.parametrize('partial_call, expected_url', [
|
@pytest.mark.parametrize('partial_call, expected_url', [
|
||||||
(
|
(
|
||||||
partial(TemplatePreview.from_database_object, filetype='bar'),
|
partial(TemplatePreview.from_database_object, filetype='bar'),
|
||||||
'http://localhost:6013/preview.bar',
|
'http://localhost:9999/preview.bar',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
partial(TemplatePreview.from_database_object, filetype='baz'),
|
partial(TemplatePreview.from_database_object, filetype='baz'),
|
||||||
'http://localhost:6013/preview.baz',
|
'http://localhost:9999/preview.baz',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
partial(TemplatePreview.from_database_object, filetype='bar', page=99),
|
partial(TemplatePreview.from_database_object, filetype='bar', page=99),
|
||||||
'http://localhost:6013/preview.bar?page=99',
|
'http://localhost:9999/preview.bar?page=99',
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
def test_from_database_object_makes_request(
|
def test_from_database_object_makes_request(
|
||||||
|
|||||||
Reference in New Issue
Block a user