Skip to content

Commit

Permalink
make tests
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Oct 31, 2023
1 parent c122b3a commit e66c0c2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lemarche/www/tenders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ def test_tender_wizard_form_not_created(self):
with self.assertRaises(AssertionError):
self._check_every_step(tenders_step_data, final_redirect_page=reverse("siae:search_results"))

def test_tender_wizard_form_external_link_required_for_tender(self):
self.client.force_login(self.user_buyer)
tenders_step_data = self._generate_fake_data_form(_step_1={"general-kind": tender_constants.KIND_TENDER})
# remove required field in survey
tenders_step_data[1].pop("detail-external_link")
with self.assertRaises(AssertionError):
self._check_every_step(tenders_step_data, final_redirect_page=reverse("siae:search_results"))

def test_tender_wizard_form_contact_response_required_for_project(self):
self.client.force_login(self.user_buyer)
tenders_step_data = self._generate_fake_data_form(_step_1={"general-kind": tender_constants.KIND_PROJECT})
# remove required field in survey
tenders_step_data[2].pop("contact-response_kind")
with self.assertRaises(AssertionError):
self._check_every_step(tenders_step_data, final_redirect_page=reverse("siae:search_results"))

def test_tender_wizard_form_all_good_anonymous(self):
tenders_step_data = self._generate_fake_data_form()
final_response = self._check_every_step(tenders_step_data, final_redirect_page=reverse("siae:search_results"))
Expand Down

0 comments on commit e66c0c2

Please sign in to comment.