From 60debb6e86f20e4b4c6ddc5b8346ab650e4f08c9 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 10 Nov 2021 09:40:36 +0100 Subject: [PATCH] added test for offboarding process --- evapp/tests.py | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/evapp/tests.py b/evapp/tests.py index 27db2e9..a408fc3 100644 --- a/evapp/tests.py +++ b/evapp/tests.py @@ -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) @@ -84,8 +84,35 @@ 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': '1', + '1-firstdate_employment': '2021-01-01', + '1-firstdate_presence': '2021-01-01', + '1-jobdescription_german': 'hau drauf', + '1-jobdescription_english': 'und schluss', + '1-works_in_gs': False + }, 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)