From 0ac8c50af961162d3bfe56bc85e4eeb76dd0c9fe Mon Sep 17 00:00:00 2001 From: Chris Wynne Date: Fri, 22 Sep 2017 16:57:18 +0100 Subject: [PATCH 1/2] Add briefs external views to external blueprint They'll be imported by the briefs frontend instead of being defined there. --- dmutils/external.py | 16 ++++++++++++++++ tests/email/test_user_account_email.py | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dmutils/external.py b/dmutils/external.py index 1702af29..249775de 100644 --- a/dmutils/external.py +++ b/dmutils/external.py @@ -2,6 +2,15 @@ external = Blueprint('external', __name__) +# Buyer frontend + + +@external.route('//opportunities/') +def get_brief_by_id(framework_framework, brief_id): + raise NotImplementedError() + +# Supplier frontend + @external.route('/suppliers/opportunities//responses/result') def view_response_result(brief_id): @@ -12,7 +21,14 @@ def view_response_result(brief_id): def opportunities_dashboard(framework_slug): raise NotImplementedError() +# User frontend + @external.route('/user/create/') def create_user(encoded_token): raise NotImplementedError() + + +@external.route('/user/login') +def render_login(): + raise NotImplementedError() diff --git a/tests/email/test_user_account_email.py b/tests/email/test_user_account_email.py index b976548a..d5c19bb8 100644 --- a/tests/email/test_user_account_email.py +++ b/tests/email/test_user_account_email.py @@ -36,7 +36,7 @@ def test_correctly_calls_notify_client_for_buyer( 'buyer', 'test@example.gov.uk', current_app.config['NOTIFY_TEMPLATES']['create_user_account'] - ) + ) notify_client_mock.send_email.assert_called_once_with( 'test@example.gov.uk', @@ -75,7 +75,7 @@ def test_correctly_calls_notify_client_for_supplier( 'user': 'Digital Marketplace Team', 'supplier': 'Digital Marketplace' } - ) + ) notify_client_mock.send_email.assert_called_once_with( 'test@example.gov.uk', @@ -102,7 +102,7 @@ def test_abort_with_503_if_send_email_fails_with_EmailError(self, DMNotifyClient 'buyer', 'test@example.gov.uk', current_app.config['NOTIFY_TEMPLATES']['create_user_account'] - ) + ) current_app.logger.error.assert_called_once_with( "{code}: Create user email for email_hash {email_hash} failed to send. Error: {error}", From 4426954246c478f93cf52db95a2335c63e383f6d Mon Sep 17 00:00:00 2001 From: Chris Wynne Date: Fri, 22 Sep 2017 16:58:05 +0100 Subject: [PATCH 2/2] Bump version to 28.5.0 --- dmutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmutils/__init__.py b/dmutils/__init__.py index a36dc460..0fdf0f8a 100644 --- a/dmutils/__init__.py +++ b/dmutils/__init__.py @@ -4,4 +4,4 @@ import flask_featureflags # noqa -__version__ = '28.4.0' +__version__ = '28.5.0'