From bcefa660b85ac0d8abcb279ff1c934dd0db18aa6 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Tue, 26 Sep 2023 16:24:38 +0200 Subject: [PATCH] Update tests --- lemarche/www/tenders/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lemarche/www/tenders/tests.py b/lemarche/www/tenders/tests.py index 922c2dded..d64ec2300 100644 --- a/lemarche/www/tenders/tests.py +++ b/lemarche/www/tenders/tests.py @@ -1283,6 +1283,7 @@ def test_only_tender_author_with_sesame_token_can_call_tender_survey_transaction def test_update_tender_stats_on_tender_survey_transactioned_answer_true(self): user_sesame_query_string = sesame_get_query_string(self.user_buyer_1) self.assertEqual(self.tender.survey_transactioned_answer, None) + self.assertEqual(self.tender.siae_transactioned, None) # load without answer url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1292,6 +1293,7 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_true(self): self.assertEqual(response.status_code, 200) # redirect self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, None) + self.assertEqual(Tender.objects.get(id=self.tender.id).siae_transactioned, None) # load with answer url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1303,6 +1305,7 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_true(self): self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertContains(response, "Merci pour vote réponse") self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, True) + self.assertEqual(Tender.objects.get(id=self.tender.id).siae_transactioned, True) # reload with answer, ignore changes url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1314,10 +1317,12 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_true(self): self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertContains(response, "Votre réponse a déjà été prise en compte") self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, True) + self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transasiae_transactionedctioned_answer, True) def test_update_tender_stats_on_tender_survey_transactioned_answer_false(self): user_sesame_query_string = sesame_get_query_string(self.user_buyer_1) self.assertEqual(self.tender.survey_transactioned_answer, None) + self.assertEqual(self.tender.siae_transactioned, None) # load without answer url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1327,6 +1332,7 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_false(self): self.assertEqual(response.status_code, 200) # redirect self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, None) + self.assertEqual(Tender.objects.get(id=self.tender.id).siae_transactioned, None) # load with answer url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1338,6 +1344,7 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_false(self): self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertContains(response, "Merci pour vote réponse") self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, False) + self.assertEqual(Tender.objects.get(id=self.tender.id).siae_transactioned, False) # reload with answer, ignore changes url = ( reverse("tenders:detail-survey-transactioned", kwargs={"slug": self.tender.slug}) @@ -1349,3 +1356,4 @@ def test_update_tender_stats_on_tender_survey_transactioned_answer_false(self): self.assertRedirects(response, reverse("tenders:detail", kwargs={"slug": self.tender.slug})) self.assertContains(response, "Votre réponse a déjà été prise en compte") self.assertEqual(Tender.objects.get(id=self.tender.id).survey_transactioned_answer, False) + self.assertEqual(Tender.objects.get(id=self.tender.id).siae_transactioned, False)