diff --git a/survey_contact_generation/tests/test_survey_contact_generation.py b/survey_contact_generation/tests/test_survey_contact_generation.py index 69ddeba8..ed1c29c3 100644 --- a/survey_contact_generation/tests/test_survey_contact_generation.py +++ b/survey_contact_generation/tests/test_survey_contact_generation.py @@ -8,18 +8,19 @@ @tagged("-at_install", "post_install") class SurveyContactGenerationCase(SurveyCase, HttpCase): - def setUp(self): + @classmethod + def setUpClass(cls): """We run the tour in the setup so we can share the tests case with other modules""" - super().setUp() - self.survey = self.env.ref("survey_contact_generation.survey_contact_creation") - initial_user_inputs = self.survey.user_input_ids + super().setUpClass() + cls.survey = cls.env.ref("survey_contact_generation.survey_contact_creation") + initial_user_inputs = cls.survey.user_input_ids # Run the survey as a portal user and get the generated quotation - self.start_tour( - f"/survey/start/{self.survey.access_token}", + cls.start_tour( + f"/survey/start/{cls.survey.access_token}", "test_survey_contact_generation", ) - self.user_input = self.survey.user_input_ids - initial_user_inputs + cls.user_input = cls.survey.user_input_ids - initial_user_inputs @tagged("-at_install", "post_install")