diff --git a/.travis.yml b/.travis.yml index 0d3cf78c5..54e379fae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ python: - '2.6' - '2.7' - '3.2' +- '3.3' +- '3.4' +- '3.5' install: - python setup.py install script: diff --git a/MIT.LICENSE b/MIT.LICENSE new file mode 100644 index 000000000..ef8b18d38 --- /dev/null +++ b/MIT.LICENSE @@ -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. \ No newline at end of file diff --git a/README.rst b/README.rst index 5587eca3a..000712c79 100644 --- a/README.rst +++ b/README.rst @@ -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:** @@ -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 @@ -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 diff --git a/test/test_mail_v2.py b/test/test_mail_v2.py index 7038d3663..ad6ff5e61 100644 --- a/test/test_mail_v2.py +++ b/test/test_mail_v2.py @@ -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) @@ -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): diff --git a/tox.ini b/tox.ini index a8b9b53ad..ebd181b59 100644 --- a/tox.ini +++ b/tox.ini @@ -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 [] @@ -23,4 +23,19 @@ basepython = python2.7 [testenv:py32] commands = {envbindir}/python -m unittest discover -v [] deps = -basepython = python3.2 \ No newline at end of file +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 \ No newline at end of file