test for mail sending added
This commit is contained in:
parent
61523c32b2
commit
8cd195a336
2
TODO
2
TODO
|
@ -1,5 +1,3 @@
|
|||
* remove dot before "Nextcloud" at login page.
|
||||
|
||||
* test for mail sending
|
||||
|
||||
* firstname lastname in subject
|
||||
|
|
|
@ -3,6 +3,7 @@ from django.test import Client
|
|||
from django.contrib.auth.models import User
|
||||
from django.conf import settings
|
||||
from django.http import HttpResponse
|
||||
from django.core import mail
|
||||
|
||||
from .forms import ITForm, WorkingForm, OfficeForm, DummyForm
|
||||
|
||||
|
@ -40,7 +41,7 @@ class LoginTestCase(TestCase):
|
|||
return response
|
||||
|
||||
def testWizzard(self):
|
||||
''' this test goes thru the whole process of the EvaFormView from start to end '''
|
||||
''' this test goes through the whole process of the EvaFormView from start to end '''
|
||||
|
||||
self.assertEqual(200, self.response.status_code)
|
||||
|
||||
|
@ -73,10 +74,15 @@ class LoginTestCase(TestCase):
|
|||
'3-transponder': 'NORM'
|
||||
}, DummyForm)
|
||||
|
||||
repsone = self._postform({
|
||||
response = self._postform({
|
||||
'eva_form_view-current_step': '5',
|
||||
}, DummyForm)
|
||||
|
||||
def test_mail(self):
|
||||
self.testWizzard()
|
||||
# print(mail.outbox)
|
||||
self.assertGreater(len(mail.outbox), 2)
|
||||
self.assertIn("Ara Seva", mail.outbox[0].subject)
|
||||
|
||||
class NoLoginTestCase(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue