@@ -93,8 +93,8 @@ def test_contacts_get(self) -> None:
9393 )
9494 assert contact ["id" ] == "e169aa45-1ecf-4183-9955-b1499d5701d3"
9595 assert contact ["email" ] == "steve.wozniak@gmail.com"
96- assert contact [ "first_name" ] == "Steve"
97- assert contact [ "last_name" ] == "Wozniak"
96+ assert contact . get ( "first_name" ) == "Steve"
97+ assert contact . get ( "last_name" ) == "Wozniak"
9898 assert contact ["created_at" ] == "2023-10-06T23:47:56.678Z"
9999 assert contact ["unsubscribed" ] is False
100100
@@ -144,7 +144,7 @@ def test_contacts_remove_by_id(self) -> None:
144144 self .set_mock_json (
145145 {
146146 "object" : "contact" ,
147- "id " : "520784e2-887d-4c25-b53c-4ad46ad38100" ,
147+ "contact " : "520784e2-887d-4c25-b53c-4ad46ad38100" ,
148148 "deleted" : True ,
149149 }
150150 )
@@ -153,7 +153,7 @@ def test_contacts_remove_by_id(self) -> None:
153153 audience_id = "48c269ed-9873-4d60-bdd9-cd7e6fc0b9b8" ,
154154 id = "78261eea-8f8b-4381-83c6-79fa7120f1cf" ,
155155 )
156- assert rmed ["id " ] == "520784e2-887d-4c25-b53c-4ad46ad38100"
156+ assert rmed ["contact " ] == "520784e2-887d-4c25-b53c-4ad46ad38100"
157157 assert rmed ["deleted" ] is True
158158
159159 def test_should_remove_contacts_by_id_raise_exception_when_no_content (self ) -> None :
@@ -168,16 +168,16 @@ def test_contacts_remove_by_email(self) -> None:
168168 self .set_mock_json (
169169 {
170170 "object" : "contact" ,
171- "id " : "520784e2-887d-4c25-b53c-4ad46ad38100" ,
171+ "contact " : "520784e2-887d-4c25-b53c-4ad46ad38100" ,
172172 "deleted" : True ,
173173 }
174174 )
175175
176- rmed : resend .Contact = resend .Contacts .remove (
176+ rmed : resend .Contacts . RemoveContactResponse = resend .Contacts .remove (
177177 audience_id = "48c269ed-9873-4d60-bdd9-cd7e6fc0b9b8" ,
178178 email = "someemail@email.com" ,
179179 )
180- assert rmed ["id " ] == "520784e2-887d-4c25-b53c-4ad46ad38100"
180+ assert rmed ["contact " ] == "520784e2-887d-4c25-b53c-4ad46ad38100"
181181 assert rmed ["deleted" ] is True
182182
183183 def test_should_remove_contacts_by_email_raise_exception_when_no_content (
@@ -222,8 +222,8 @@ def test_contacts_list(self) -> None:
222222 )
223223 assert contacts ["data" ][0 ]["id" ] == "e169aa45-1ecf-4183-9955-b1499d5701d3"
224224 assert contacts ["data" ][0 ]["email" ] == "steve.wozniak@gmail.com"
225- assert contacts ["data" ][0 ][ "first_name" ] == "Steve"
226- assert contacts ["data" ][0 ][ "last_name" ] == "Wozniak"
225+ assert contacts ["data" ][0 ]. get ( "first_name" ) == "Steve"
226+ assert contacts ["data" ][0 ]. get ( "last_name" ) == "Wozniak"
227227 assert contacts ["data" ][0 ]["created_at" ] == "2023-10-06T23:47:56.678Z"
228228 assert contacts ["data" ][0 ]["unsubscribed" ] is False
229229
0 commit comments