Skip to content

Commit 77e6562

Browse files
Andrew TorranceAndrew Torrance
Andrew Torrance
authored and
Andrew Torrance
committed
Merge branch 'master' into feature/version-two-endpoints-removing-actor
* master: Feature/support multiple internal users (#140) # Conflicts: # secure_message/api_mocks/internal_user_service_mock.py # secure_message/application.py # secure_message/repository/retriever.py # secure_message/resources/drafts.py # secure_message/validation/domain.py # tests/app/test_app.py # tests/app/test_retriever.py # tests/behavioural/features/draft_post.feature # tests/behavioural/features/drafts_get.feature # tests/behavioural/features/message_post.feature # tests/behavioural/features/messages_get.feature # tests/behavioural/features/steps/from_field.py # tests/behavioural/features/steps/secure_messaging_context_helper.py
2 parents 82bce14 + 08470f4 commit 77e6562

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

secure_message/api_mocks/internal_user_service_mock.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ def __init__(self):
3333
"emailAddress": "mock@email.com"
3434
},
3535
"BRES": {
36-
"id": 'BRES',
36+
"id": "BRES",
3737
"firstName": "BRES",
3838
"lastName": "",
39-
"emailAddress": "",
40-
"telephone": "", "status": "",
41-
"sampleUnitType": "BI"
39+
"emailAddress": "mock@email.com"
4240
},
4341
"SomeStringUntilWeGetIds": {
4442
"id": "SomeStringUntilWeGetIds",

secure_message/application.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from secure_message.v2.resources.messages import MessageSendV2, MessageCounterV2
2020
from secure_message.resources.threads import ThreadById, ThreadList
2121

22-
2322
logger_initial_config(service_name='ras-secure-message')
2423
logger = wrap_logger(logging.getLogger(__name__))
2524

tests/app/test_app.py

+2
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ def test_case_service_not_called_on_sent_if_NotifyCaseService_is_not_set(self, c
374374
@patch.object(case_service, 'store_case_event')
375375
def test_case_service_called_on_sent_if_NotifyCaseService_is_set(self, case):
376376
"""Test case service called if set to do so in config """
377+
378+
self.app.config["NOTIFY_VIA_GOV_NOTIFY"] = '0'
377379
self.app.config['NOTIFY_CASE_SERVICE'] = '1'
378380
self.app.config['NOTIFY_VIA_GOV_NOTIFY'] = '0'
379381
url = "http://localhost:5050/message/send"

tests/app/test_mock_party.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@ def test_message_by_id_replaces_uuids(self):
162162
self.assertEqual(message['@msg_to'], [{"id": "BRES",
163163
"firstName": "BRES",
164164
"lastName": "",
165-
"emailAddress": "",
166-
"telephone": "",
167-
"status": "",
168-
"sampleUnitType": "BI"
165+
"emailAddress": "mock@email.com"
169166
}])
170167

171168
def test_messages_get_replaces_uuids_with_user_details(self):
@@ -269,9 +266,7 @@ def test_drafts_get_return_user_details_in_to_and_from(self):
269266
self.assertEqual(draft['@msg_to'][0], {"id": constants.BRES_USER,
270267
"firstName": "BRES",
271268
"lastName": "",
272-
"emailAddress": "",
273-
"telephone": "", "status": "",
274-
"sampleUnitType": "BI"})
269+
"emailAddress": "mock@email.com"})
275270

276271
def test_get_business_details_by_ru(self):
277272
"""Test get details for one business using ru_id"""

tests/behavioural/features/message_get.feature

-15
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,6 @@ Feature: Message get by ID Endpoint
6464
Then a success status code (200) is returned
6565
And retrieved message additional from data matches that from party service
6666

67-
68-
Scenario: Internal user saves and retrieves a message verify the message from additional data (@msg_from) is as expected
69-
Given sending from internal bres user to respondent
70-
And the message is sent
71-
When the message is read
72-
Then a success status code (200) is returned
73-
And retrieved message additional from data matches that from party service
74-
75-
Scenario: Respondent saves and retrieves a message verify the message to additional data (@msg_to) is as expected
76-
Given sending from respondent to internal bres user
77-
And the message is sent
78-
When the message is read
79-
Then a success status code (200) is returned
80-
And retrieved message additional to data matches that from party service
81-
8267
Scenario: Internal user saves and retrieves a message verify the message to additional data (@msg_to) is as expected
8368
Given sending from internal bres user to respondent
8469
And the message is sent

0 commit comments

Comments
 (0)