Commit Graph

157 Commits

Author SHA1 Message Date
medmunds
6d94e94736 Live API tests
Addresses #41.
(Still need to add a Mandrill test key to the Travis config.)
2015-05-13 16:27:38 -07:00
medmunds
00ddd2f4f6 Improve MandrillAPIError.__str__
* Include formatted response from Mandrill API (if any)
* Clean up recipient address(es)
2015-05-13 15:43:54 -07:00
medmunds
8db86a8274 Fix RuntimeError on sys.modules in reset_warning_registry
Django 1.8's reset_warning_registry (which we backport)
was generating `RuntimeError: dictionary changed size
during iteration` in Travis tests under Python 3.x.

Likely a thread-safety issue on sys.modules.values().
See https://code.djangoproject.com/ticket/21049
for fix applied elsewhere in Django.
2015-05-12 18:42:12 -07:00
medmunds
fd75c4b24d Deprecate DjrillBackendHTTPError 2015-05-12 18:27:29 -07:00
medmunds
8d274e7b16 Deprecate DjrillMessage 2015-05-12 16:14:58 -07:00
medmunds
80895316f1 Deprecate DjrillAdminSite 2015-05-12 15:56:30 -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
52de627af1 Clean up test warnings for Django 1.8
* Django 1.8 requires TEMPLATES setting (for admin tests)
* Ignore cycle tag deprecation warnings

One remaining PendingDeprecationWarning: "the imp module is
deprecated in favour of importlib" is coming from six, and has a fix
waiting to land: https://bitbucket.org/gutworth/six/issue/112
2015-05-11 18:09:56 -07:00
medmunds
d91e2c2f91 Adopt semver
Djrill's been practicing semver since 1.0; make it official now.
2015-05-11 17:00:32 -07:00
medmunds
6891b0de91 Fix tests on Python 2.6 2015-02-25 21:13:16 -08:00
medmunds
bbc2e06091 Support Django 1.8 reply_to param. 2015-02-25 16:30:02 -08:00
medmunds
8ab36d2cd0 Django 1.8 alpha 1 support
* Test on Python 2.7, 3.4, pypy.
* Call super.setUpClass in DjrillAdminTests.
  https://docs.djangoproject.com/en/dev/releases/1.8/#overriding-setupclass-teardownclass-in-test-cases

Also clear up some new PendingDeprecationWarnings, where
the changes can easily remain compatible back to Django 1.3:

* Remove deprecated django.conf.urls.patterns.
  (And match Django recommendations in our docs.)
  https://docs.djangoproject.com/en/dev/releases/1.8/#django-conf-urls-patterns
* Remove deprecated SimpleTestCase.urls.
  (We've already back-ported @override_settings
  for testing older Django versions.)
  https://docs.djangoproject.com/en/dev/releases/1.8/#django-test-simpletestcase-urls
2015-01-16 16:17:31 -08:00
medmunds
00a0a1fde6 Open v1.4 dev.
[ci skip]
2015-01-16 14:06:57 -08:00
medmunds
76e29c0845 Support merge_language option.
Closes #84.
2015-01-16 13:48:39 -08:00
medmunds
1c4ee989f7 Fix "the JSON object must be str, not 'bytes'" on python3.
Closes #82.

* Test mock API responses (with actual content) in admin tests.
  (This exposes failure case, at least under Python 3.4/Django 1.6.)
* Parse json from Response.text, rather than raw Response.content
  bytes, in admin views.
2015-01-16 13:36:00 -08: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
Elias Freider
95f143d8ca Changes the default API endpoint to the https version 2015-01-16 16:59:48 +01:00
medmunds
52430216fc Open v1.3 dev 2014-09-29 17:14:04 -07:00
Mike Edmunds
c3f3480024 Merge pull request #75 from pkimber/master
If missing 'from_email', then 'log_message' will fail to build
2014-09-29 16:04:31 -07:00
medmunds
c6b171b671 Document Django 1.7 admin installation changes.
Closes #74.
2014-09-29 14:44:22 -07:00
Patrick Kimber
0063fde2e5 if missing 'from_email', then 'log_message' will fail to build 2014-08-04 15:32:24 +01:00
medmunds
19014a72b0 Open v1.2 development
[ci skip]
2014-05-28 21:33:17 -07:00
medmunds
780d4f98f7 use_template_subject and use_template_from
Change "clear_subject" and "clear_from" to clarify expected usage.
Update docs.
Acknowledge contribution.
2014-05-28 21:09:28 -07:00
medmunds
78ff0af229 Merge branch 'feature/use-mandrill-template-defaults' of git://github.com/nikolay-saskovets/Djrill into nikolay-saskovets-feature/use-mandrill-template-defaults 2014-05-28 20:42:36 -07:00
nikolay.saskovets
3eb4582449 fix test 2014-05-16 07:57:53 -04:00
nikolay.saskovets
0e27a62f3c prepare for PR to mainstream (tests, docs, ...) 2014-05-16 07:37:51 -04:00
nikolay.saskovets
c3420d156e ability to use default Mandrill subject and from fields 2014-05-16 06:57:58 -04:00
winhamwr
f2a08894fa Fixed python 3.2 compatibility. 2014-04-23 18:37:46 -04:00
winhamwr
70dc022f77 Handle unicode attachment content in both python 2.X and python3. 2014-04-23 16:59:48 -04:00
winhamwr
4e0a0cca71 Added failing test showing that unicode attachments cause an error 2014-04-23 15:52:05 -04: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
medmunds
ea2499f92f Fix possible test-sequencing issue in DjrillMandrillSubaccountTests 2014-04-20 15:03:49 -07:00
medmunds
28c5a3a742 Fix PendingDeprecationWarning for cycle tag on Django 1.6+ 2014-04-20 14:44:25 -07:00
medmunds
09fe0b0e12 Open 1.1 development 2014-04-20 13:43:27 -07:00
medmunds
ba2302ae56 Subaccounts: Document setting; verify message option overrides global setting 2014-04-20 12:57:08 -07:00
Sameer Al-Sakran
3c7a69873f fix tests + add base send test 2014-04-14 11:45:24 -07:00
Michael Hobbs
21e8727b1d use MANDRILL_SUBACCOUNT to match the API field 2014-04-11 14:24:31 -07:00
Sameer Al-Sakran
cd8c2b8760 add subaccount support to djrill 2014-04-11 13:15:09 -07:00
medmunds
1707e2a665 Open dev branch for 1.0 2014-01-25 13:05:34 -08:00
medmunds
d7c06bb576 Better handling for cc and bcc recipients.
Fixes #59.
2014-01-25 12:35:23 -08:00
medmunds
1e44392b13 Allow all extra message headers in send.
Mandrill has relaxed previous API restrictions on headers.
Fixes #58.
2014-01-25 11:58:12 -08:00
medmunds
ec7a302252 Master is now 0.9dev 2014-01-12 11:28:54 -08:00
Eric Hennings
3a6f3ec4c4 Fix tests broken for python 3.0 (no u’strings’) 2014-01-06 08:33:36 -08: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
551de88604 Start 0.8 development
[ci skip]
2013-10-20 10:50:30 -07:00
medmunds
12426204a5 Support important, view_content_link, return_path_domain, subaccount.
Closes #49.
2013-10-19 13:24:56 -07:00
medmunds
b26ba42e77 Support async, ip_pool, and send_at.
Closes #40.
Closes #48.
2013-10-19 13:09:05 -07:00
medmunds
f565a4c294 Mandrill requires template_content field for send-template.
Fixes #47.
2013-10-19 11:41:20 -07:00
crccheck
393d6e7fa8 Fix: html messages were sent as text
If you followed the instructions at:
<https://docs.djangoproject.com/en/1.5/topics/email/#sending-alternative-content-types>,
djrill would send the body as 'text' instead of 'html', resulting in
ugly emails.

This also fixes how `[auto_text]` could be set, but couldn't do anything.
If you wanted to use `auto_text=True`, you would have to send a null
body and then `attach_alternative` your real body. I didn't add a test
case for this because they're like... orthogonal..., and gets into
behavior testing vs unit testing.

  [auto_text]: https://djrill.readthedocs.org/en/master/usage/sending_mail/#auto_text
2013-09-26 15:32:55 -05:00
crccheck
f5465700a8 Add: failing test for html only messages 2013-09-26 15:31:28 -05:00