mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Merge pull request #591 from alphagov/team-id-for-deskpro
Renamed DESKPRO_TEAM_ID to DESKPRO_DEPT_ID
This commit is contained in:
@@ -14,7 +14,8 @@ def feedback():
|
|||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
data = {
|
data = {
|
||||||
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
||||||
'department_id': current_app.config.get('DESKPRO_TEAM_ID'),
|
'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
|
||||||
|
'assigned_agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'message': 'Environment: {}\n\n{}\n{}\n{}'.format(
|
'message': 'Environment: {}\n\n{}\n{}\n{}'.format(
|
||||||
url_for('main.index', _external=True),
|
url_for('main.index', _external=True),
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ def service_request_to_go_live(service_id):
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
||||||
'department_id': current_app.config.get('DESKPRO_TEAM_ID'),
|
'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
|
||||||
|
'assigned_agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
|
||||||
'subject': 'Request to go live',
|
'subject': 'Request to go live',
|
||||||
'message': "From {} <{}> on behalf of {} ({})\n\nUsage estimate\n---\n\n{}".format(
|
'message': "From {} <{}> on behalf of {} ({})\n\nUsage estimate\n---\n\n{}".format(
|
||||||
current_user.name,
|
current_user.name,
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ class Config(object):
|
|||||||
DESKPRO_API_HOST = os.environ['DESKPRO_API_HOST']
|
DESKPRO_API_HOST = os.environ['DESKPRO_API_HOST']
|
||||||
DESKPRO_API_KEY = os.environ['DESKPRO_API_KEY']
|
DESKPRO_API_KEY = os.environ['DESKPRO_API_KEY']
|
||||||
DESKPRO_PERSON_EMAIL = os.environ['DESKPRO_PERSON_EMAIL']
|
DESKPRO_PERSON_EMAIL = os.environ['DESKPRO_PERSON_EMAIL']
|
||||||
DESKPRO_TEAM_ID = os.environ['DESKPRO_TEAM_ID']
|
DESKPRO_DEPT_ID = os.environ['DESKPRO_DEPT_ID']
|
||||||
|
DESKPRO_ASSIGNED_AGENT_TEAM_ID = os.environ['DESKPRO_ASSIGNED_AGENT_TEAM_ID']
|
||||||
ACTIVITY_STATS_LIMIT_DAYS = 7
|
ACTIVITY_STATS_LIMIT_DAYS = 7
|
||||||
|
|
||||||
EMAIL_DOMAIN_REGEXES = [
|
EMAIL_DOMAIN_REGEXES = [
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ export SECRET_KEY='dev-notify-secret-key'
|
|||||||
export DESKPRO_API_HOST=""
|
export DESKPRO_API_HOST=""
|
||||||
export DESKPRO_API_KEY=""
|
export DESKPRO_API_KEY=""
|
||||||
export DESKPRO_PERSON_EMAIL=""
|
export DESKPRO_PERSON_EMAIL=""
|
||||||
export DESKPRO_TEAM_ID=""
|
export DESKPRO_DEPT_ID=""
|
||||||
|
export DESKPRO_ASSIGNED_AGENT_TEAM_ID=""
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from flask import (url_for, current_app)
|
from flask import url_for
|
||||||
from werkzeug.exceptions import InternalServerError
|
from werkzeug.exceptions import InternalServerError
|
||||||
from unittest.mock import Mock, ANY
|
from unittest.mock import Mock, ANY
|
||||||
|
|
||||||
@@ -48,6 +48,7 @@ def test_post_feedback_with_no_name_email(app_, mocker):
|
|||||||
ANY,
|
ANY,
|
||||||
data={
|
data={
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
|
'assigned_agent_team_id': ANY,
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'message': 'Environment: http://localhost/\n\n\n\nblah',
|
'message': 'Environment: http://localhost/\n\n\n\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
@@ -69,6 +70,7 @@ def test_post_feedback_with_name_email(app_, mocker):
|
|||||||
data={
|
data={
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
|
'assigned_agent_team_id': ANY,
|
||||||
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
headers=ANY)
|
headers=ANY)
|
||||||
@@ -94,6 +96,7 @@ def test_log_error_on_post(app_, mocker):
|
|||||||
data={
|
data={
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
|
'assigned_agent_team_id': ANY,
|
||||||
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
headers=ANY)
|
headers=ANY)
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ def test_should_redirect_after_request_to_go_live(
|
|||||||
data={
|
data={
|
||||||
'subject': 'Request to go live',
|
'subject': 'Request to go live',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
|
'assigned_agent_team_id': ANY,
|
||||||
'message': 'From Test User <test@user.gov.uk> on behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
|
'message': 'From Test User <test@user.gov.uk> on behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
|
||||||
'person_email': ANY
|
'person_email': ANY
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user