Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/test_sendgrid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sendgrid
from sendgrid.helpers.mail import *
from sendgrid.version import __version__
try:
import unittest2 as unittest
Expand Down Expand Up @@ -108,6 +109,13 @@ def test_reset_request_headers(self):
for k,v in self.sg._get_default_headers().items():
self.assertEqual(v, self.sg.client.request_headers[k])

def test_hello_world(self):
from_email = Email("[email protected]")
to_email = Email("[email protected]")
subject = "Sending with SendGrid is Fun"
content = Content("text/plain", "and easy to do anywhere, even with Python")
mail = Mail(from_email, subject, to_email, content)
self.assertTrue(mail.get() == {'content': [{'type': 'text/plain', 'value': 'and easy to do anywhere, even with Python'}], 'personalizations': [{'to': [{'email': '[email protected]'}]}], 'from': {'email': '[email protected]'}, 'subject': 'Sending with SendGrid is Fun'})

def test_access_settings_activity_get(self):
params = {'limit': 1}
Expand Down