def test_email_backend_with_https(self):
        mail.outbox = []
        self.backend.send_login_code(self.code, secure=True, host='secure.example.com')
        self.assertEqual(1, len(mail.outbox))
        message = mail.outbox[0]
        https_url = self.code.login_url(secure=True, host='secure.example.com')
        self.assertTrue(https_url.startswith('https:'))
        self.assertIn(https_url, message.body)
Send email via EmailBackend with secure=True
dataset/ETHPy150Open relekang/django-nopassword/tests/test_backends.py/EmailBackendTests.test_email_backend_with_https