Skip to content

Commit

Permalink
add tests to check steps data
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Oct 9, 2023
1 parent be618cb commit 7ee7757
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lemarche/www/tenders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from lemarche.siaes.models import Siae
from lemarche.tenders import constants as tender_constants
from lemarche.tenders.factories import TenderFactory, TenderQuestionFactory
from lemarche.tenders.models import Tender, TenderSiae
from lemarche.tenders.models import Tender, TenderSiae, TenderStepsData
from lemarche.users.factories import UserFactory
from lemarche.users.models import User
from lemarche.www.tenders.views import TenderCreateMultiStepView
Expand Down Expand Up @@ -89,6 +89,13 @@ def _check_every_step(self, tenders_step_data, final_redirect_page: str = revers
current_errors = response.context_data["form"].errors
self.assertEquals(current_errors, {})

# Is the step data stored correctly ?
tender_step_data = TenderStepsData.objects.first()
self.assertEqual(
data_step["tender_create_multi_step_view-current_step"],
tender_step_data.steps_data[-1]["tender_create_multi_step_view-current_step"],
)

def test_anyone_can_access_create_tender(self):
# anonymous
url = reverse("tenders:create")
Expand Down

0 comments on commit 7ee7757

Please sign in to comment.