new test in master (?)
This commit is contained in:
parent
4833038eff
commit
b41f624a57
|
@ -5,7 +5,7 @@ from django.conf import settings
|
|||
from django.http import HttpResponse
|
||||
from django.core import mail
|
||||
|
||||
from .forms import ITForm, WorkingForm, OfficeForm, DummyForm
|
||||
from .forms import ITForm, WorkingForm, OfficeForm, DummyForm, OffboardingForm
|
||||
|
||||
class LoginTestCase(TestCase):
|
||||
def setUp(self):
|
||||
|
@ -45,8 +45,8 @@ class LoginTestCase(TestCase):
|
|||
self.assertContains(self.response, 'Programme', status_code=200)
|
||||
self.assertContains(self.response, 'Kommunikation und Events', status_code=200)
|
||||
|
||||
def testWizzard(self):
|
||||
''' this test goes through the whole process of the EvaFormView from start to end '''
|
||||
def test_wizzard_in(self):
|
||||
''' this test goes through the whole onboarding process of the EvaFormView from start to end '''
|
||||
|
||||
self.assertEqual(200, self.response.status_code)
|
||||
|
||||
|
@ -55,6 +55,7 @@ class LoginTestCase(TestCase):
|
|||
'0-firstname': 'Ara',
|
||||
'0-lastname': 'Seva',
|
||||
'0-department': 'CENT',
|
||||
'0-choice': 'IN'
|
||||
}, WorkingForm)
|
||||
|
||||
response = self._postform({
|
||||
|
@ -83,8 +84,39 @@ class LoginTestCase(TestCase):
|
|||
'eva_form_view-current_step': '5',
|
||||
}, DummyForm)
|
||||
|
||||
def test_wizzard_out(self):
|
||||
''' this test goes through the whole offboarding process of the EvaFormView from start to end '''
|
||||
|
||||
self.assertEqual(200, self.response.status_code)
|
||||
|
||||
response = self._postform({
|
||||
'eva_form_view-current_step': '0',
|
||||
'0-firstname': 'Ara',
|
||||
'0-lastname': 'Seva',
|
||||
'0-department': 'CENT',
|
||||
'0-choice': 'OUT'
|
||||
}, OffboardingForm)
|
||||
|
||||
response = self._postform({
|
||||
'eva_form_view-current_step': '4',
|
||||
'4-lastdate_employment': '2021-01-01',
|
||||
'4-date_returning': '2021-01-01',
|
||||
'4-lastdate_bvg': '2021-01-01',
|
||||
'4-lastdate_bahncard': '2021-01-01',
|
||||
'4-google-ownership': None,
|
||||
'4-google-autoresponder': None,
|
||||
'4-delete-account-later-at': None,
|
||||
|
||||
|
||||
}, DummyForm)
|
||||
|
||||
response = self._postform({
|
||||
'eva_form_view-current_step': '5',
|
||||
}, DummyForm)
|
||||
|
||||
|
||||
def test_mail(self):
|
||||
self.testWizzard()
|
||||
self.test_wizzard_in()
|
||||
# print(mail.outbox)
|
||||
self.assertGreater(len(mail.outbox), 2)
|
||||
self.assertIn("Ara Seva", mail.outbox[0].subject)
|
||||
|
|
Loading…
Reference in New Issue