Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ python:
- '2.6'
- '2.7'
- '3.2'
- '3.3'
- '3.4'
- '3.5'
install:
- python setup.py install
script:
Expand Down
15 changes: 15 additions & 0 deletions MIT.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Copyright (c) 2015 SendGrid

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ Tests
pyenv install 2.6.9
pyenv install 2.7.8
pyenv install 3.2.6
pyenv install 3.3.6
pyenv install 3.4.3
pyenv install 3.5.0

**Run the tests:**

Expand All @@ -491,7 +494,7 @@ Tests
virtualenv venv
source venv/bin/activate #or . ./activate.sh
python setup.py install
pyenv local 3.2.6 2.7.8 2.6.9
pyenv local 3.5.0 3.4.3 3.3.6 3.2.6 2.7.8 2.6.9
pyenv rehash
tox

Expand All @@ -507,9 +510,6 @@ Deploying
- Push changes to GitHub
- Release tag on GitHub `vX.X.X`

MIT License
-----------

.. _X-SMTPAPI: http://sendgrid.com/docs/API_Reference/SMTP_API/
.. _SMTPAPI Python library: https://github.com/sendgrid/smtpapi-python
.. _Substitution: http://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html
Expand Down
6 changes: 5 additions & 1 deletion test/test_mail_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class TestSendGrid(unittest.TestCase):

def setUp(self):
self.sg = SendGridClient(SG_USER, SG_PWD)
self.maxDiff = None

def test_apikey_init(self):
sg = SendGridClient(SG_PWD)
Expand Down Expand Up @@ -97,7 +98,10 @@ def test_send(self):
}
'''))

self.assertEqual(url, test_url)
try:
self.assertItemsEqual(url, test_url)
except: # Python 3+
self.assertCountEqual(url, test_url)

@unittest.skipUnless(sys.version_info < (3, 0), 'only for python2')
def test__build_body_unicode(self):
Expand Down
19 changes: 17 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py26, py27, py32
envlist = py26, py27, py32, py33, py34, py35

[testenv]
commands = {envbindir}/python -m unittest discover -v []
Expand All @@ -23,4 +23,19 @@ basepython = python2.7
[testenv:py32]
commands = {envbindir}/python -m unittest discover -v []
deps =
basepython = python3.2
basepython = python3.2

[testenv:py33]
commands = {envbindir}/python -m unittest discover -v []
deps =
basepython = python3.3

[testenv:py34]
commands = {envbindir}/python -m unittest discover -v []
deps =
basepython = python3.4

[testenv:py35]
commands = {envbindir}/python -m unittest discover -v []
deps =
basepython = python3.5