Skip to content

Commit 977c695

Browse files
Update test assertion to use keyword arguments
Co-Authored-By: Aaron de Mello <aaron.d@nylas.com>
1 parent 1490632 commit 977c695

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/resources/test_drafts.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from nylas.models.drafts import Draft
44
from nylas.resources.drafts import Drafts
5+
from nylas.resources.messages import Messages
56

67

78
class TestDraft:
@@ -371,22 +372,21 @@ def test_send_draft(self, http_client_response):
371372
)
372373

373374
def test_send_message_with_metadata(self, http_client_response):
374-
drafts = Drafts(http_client_response)
375+
messages = Messages(http_client_response)
375376
request_body = {
376377
"subject": "Hello from Nylas!",
377378
"to": [{"name": "Jon Snow", "email": "jsnow@gmail.com"}],
378379
"body": "This is the body of my message.",
379380
"metadata": {"custom_field": "value", "another_field": 123}
380381
}
381382

382-
drafts.send(identifier="abc-123", request_body=request_body)
383+
messages.send(identifier="abc-123", request_body=request_body)
383384

384385
http_client_response._execute.assert_called_once_with(
385-
"POST",
386-
"/v3/grants/abc-123/messages/send",
387-
None,
388-
None,
389-
request_body,
386+
method="POST",
387+
path="/v3/grants/abc-123/messages/send",
388+
request_body=request_body,
389+
data=None,
390390
overrides=None,
391391
)
392392

0 commit comments

Comments
 (0)