Commit Graph

10 Commits

Author SHA1 Message Date
medmunds
8433e6d660 Clean up all imports
* Use relative imports within djrill package
* Standardize ordering
* Remove absolute_import (it's standard in all
  python versions we now support)
2015-11-30 17:33:08 -08:00
William Hector
bac85511b5 Use requests.session to pool requests when mass sending mail
Tests modified to patch the ression post and close session upon error.
RE: http://stackoverflow.com/q/30982717/647002
2015-07-11 22:12:14 +01:00
medmunds
da260de1a0 Drop support for Django 1.3, Python 2.6 and 3.2.
* Shrink the Travis test matrix
* Remove a lot of backported test code
* Update requirements in setup.py
* Update docs

Closes #79
2015-05-14 11:39:57 -07:00
medmunds
cc56b96efa Improve and document JSON serialization for Mandrill API
* Add some context to exceptions on unserializable
  values (addresses #89).
* Document need to format merge data
  (into something JSON-serializable).
* Add RemovedInDjrill2 DeprecationWarning.
* Deprecate blanket date/datetime serialization.
2015-05-12 13:29:52 -07:00
medmunds
11961b57e5 Use real Response object in DjrillBackendMockAPITestCase tests.
(Improves testing accuracy around API response encoding.)

* Add `six` as test dependency (six.BytesIO, six.b)
* Change MockResponse content to bytes (because HTTP responses
  are bytes, not strings)
2015-01-16 13:18:17 -08:00
medmunds
8815601b65 Use override_settings rather than mucking with settings in tests
Second attempt to address possible test sequencing issue around tests that alter settings. (Failures in Travis tests not reproducible locally.)

Back-ports override_settings from Django 1.4 for compatibility with Django 1.3.
2014-04-20 16:04:31 -07:00
Eric Hennings
e1c78ec197 Add the Mandrill send API response to EmailMessage as a property, mandrill_response, when a message is sent. For errors, set mandrill_response to None. Add tests & docs. 2013-12-22 14:12:57 -08:00
medmunds
64f32fbc72 Use python's json rather than Django's
django.utils.simplejson is deprecated; Python 2.6+ includes json.
Fixes #32.
2013-03-13 09:52:51 -07:00
medmunds
207e94e6d0 Tests: add ability to check which Mandrill API endpoint was used.
Add DjrillBackendMockAPITestCase.assert_mandrill_called; use it in representative backend test cases.

(Also make get_api_call_data work with various ways of calling requests.post.)
2013-01-11 12:44:06 -08:00
medmunds
d1b0e0a574 Tests: break apart tests.py into tests directory 2013-01-03 10:51:07 -08:00