Skip to content

Commit

Permalink
Add EMAIL_USE_SSL to tests (#157)
Browse files Browse the repository at this point in the history
`dj-email-url` added support for `EMAIL_USE_SSL` in its latest
version.
  • Loading branch information
codingjoe committed Jun 14, 2016
1 parent 1c5bd06 commit 7aaffd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def test_email_url_value(self):
'EMAIL_HOST_PASSWORD': 'password',
'EMAIL_HOST_USER': 'user@domain.com',
'EMAIL_PORT': 587,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': True})
with env(EMAIL_URL='console://'):
self.assertEqual(value.setup('EMAIL_URL'), {
Expand All @@ -401,6 +402,7 @@ def test_email_url_value(self):
'EMAIL_HOST_PASSWORD': None,
'EMAIL_HOST_USER': None,
'EMAIL_PORT': None,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': False})
with env(EMAIL_URL='smtps://user@domain.com:password@smtp.example.com:wrong'):
self.assertRaises(ValueError, value.setup, 'TEST')
Expand Down Expand Up @@ -481,6 +483,7 @@ class Target(object):
'EMAIL_HOST_PASSWORD': 'password',
'EMAIL_HOST_USER': 'user@domain.com',
'EMAIL_PORT': 587,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': True
})
self.assertEqual(Target.EMAIL_BACKEND, 'django.core.mail.backends.smtp.EmailBackend')
Expand Down

0 comments on commit 7aaffd3

Please sign in to comment.