@@ -974,7 +974,9 @@ def test_send_message_with_from_field_mapping(self, http_client_response):
974974 "subject" : "Hello from Nylas!" ,
975975 "to" : [{
"name" :
"Jon Snow" ,
"email" :
"[email protected] " }],
976976 "body" : "This is the body of my message." ,
977- "from_" : [{
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }],
977+ "from_" : [
978+ {
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }
979+ ],
978980 }
979981
980982 messages .send (identifier = "abc-123" , request_body = request_body )
@@ -995,15 +997,19 @@ def test_send_message_with_from_field_mapping(self, http_client_response):
995997 overrides = None ,
996998 )
997999
998- def test_send_message_with_existing_from_field_unchanged (self , http_client_response ):
1000+ def test_send_message_with_existing_from_field_unchanged (
1001+ self , http_client_response
1002+ ):
9991003 """Test that existing from field is left unchanged when both from and from_ are present."""
10001004 messages = Messages (http_client_response )
10011005 request_body = {
10021006 "subject" : "Hello from Nylas!" ,
10031007 "to" : [{
"name" :
"Jon Snow" ,
"email" :
"[email protected] " }],
10041008 "body" : "This is the body of my message." ,
10051009 "from" : [{
"name" :
"Existing Sender" ,
"email" :
"[email protected] " }],
1006- "from_" : [{
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }],
1010+ "from_" : [
1011+ {
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }
1012+ ],
10071013 }
10081014
10091015 messages .send (identifier = "abc-123" , request_body = request_body )
@@ -1014,7 +1020,9 @@ def test_send_message_with_existing_from_field_unchanged(self, http_client_respo
10141020 "to" : [{
"name" :
"Jon Snow" ,
"email" :
"[email protected] " }],
10151021 "body" : "This is the body of my message." ,
10161022 "from" : [{
"name" :
"Existing Sender" ,
"email" :
"[email protected] " }],
1017- "from_" : [{
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }],
1023+ "from_" : [
1024+ {
"name" :
"Daenerys Targaryen" ,
"email" :
"[email protected] " }
1025+ ],
10181026 }
10191027
10201028 http_client_response ._execute .assert_called_once_with (
0 commit comments