Skip to content

Commit

Permalink
Merge pull request #336 from alphagov/add-external-views-from-briefs
Browse files Browse the repository at this point in the history
Add external views from briefs
  • Loading branch information
Wynndow authored Sep 25, 2017
2 parents d90832e + 4426954 commit bddd379
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dmutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
import flask_featureflags # noqa


__version__ = '28.4.0'
__version__ = '28.5.0'
16 changes: 16 additions & 0 deletions dmutils/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

external = Blueprint('external', __name__)

# Buyer frontend


@external.route('/<framework_framework>/opportunities/<brief_id>')
def get_brief_by_id(framework_framework, brief_id):
raise NotImplementedError()

# Supplier frontend


@external.route('/suppliers/opportunities/<int:brief_id>/responses/result')
def view_response_result(brief_id):
Expand All @@ -12,7 +21,14 @@ def view_response_result(brief_id):
def opportunities_dashboard(framework_slug):
raise NotImplementedError()

# User frontend


@external.route('/user/create/<encoded_token>')
def create_user(encoded_token):
raise NotImplementedError()


@external.route('/user/login')
def render_login():
raise NotImplementedError()
6 changes: 3 additions & 3 deletions tests/email/test_user_account_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_correctly_calls_notify_client_for_buyer(
'buyer',
'[email protected]',
current_app.config['NOTIFY_TEMPLATES']['create_user_account']
)
)

notify_client_mock.send_email.assert_called_once_with(
'[email protected]',
Expand Down Expand Up @@ -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(
'[email protected]',
Expand All @@ -102,7 +102,7 @@ def test_abort_with_503_if_send_email_fails_with_EmailError(self, DMNotifyClient
'buyer',
'[email protected]',
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}",
Expand Down

0 comments on commit bddd379

Please sign in to comment.