def setUp(self):
        self.department = create_department_with_profile(test_user_data["department"])
        self.employer = create_employer(self.department, test_user_data["employer"])
        self.candidate = create_candidate_with_active_profile(
            test_user_data["candidate"]
        )

        self.other_candidates = []
        for test_candidate in test_user_data["candidates"]:
            self.other_candidates.append(
                create_candidate_with_active_profile(test_candidate)
            )

        self.job1 = create_job(self.department, test_user_data["job_details"][0])
        self.apps = []
        for other_candidate in self.other_candidates:
            self.apps.append(
                create_application(
                    self.job1, other_candidate, other_candidate.candidate_profile
                )
            )

        self.job2 = create_job(self.department, test_user_data["job_details"][1])
        self.apps.append(
            create_application(
                self.job2,
                self.other_candidates[0],
                self.other_candidates[0].candidate_profile,
            )
        )
 def setUp(self):
     self.candidate = create_candidate_with_active_profile(
         test_user_data["candidate"]
     )
     self.department = create_department(test_user_data["department"])
     self.job = create_job(self.department, test_user_data["job_details"][0])
     self.profile = create_profile(test_user_data["candidate"]["profile"])
 def setUp(self):
     self.candidate = create_candidate_with_active_profile(
         test_user_data["candidate"]
     )
     self.department = create_department(test_user_data["department"])
     self.employer = create_employer(self.department, test_user_data["employer"])
     self.job = create_job(self.department, test_user_data["job_details"][0])
     self.profile = create_profile(test_user_data["candidate"]["profile"])
     self.app = create_application(self.job, self.candidate, self.profile)
Пример #4
0
 def test_other_candidate_cannot_view_application(self):
     # create other candidate
     self.other_candidate = create_candidate_with_active_profile(
         test_user_data["candidates"][1]
     )
     # login other candidate
     self.client.login(
         email=test_user_data["candidates"][1]["email"],
         password=test_user_data["candidates"][1]["password"],
     )
     response = self.client.get(
         reverse("applications:application_details", kwargs={"pk": self.app.id})
     )
     self.assertContains(
         response, "You do not have the right permissions to view this page"
     )
Пример #5
0
 def setUp(self):
     self.candidate = create_candidate_with_active_profile(
         test_user_data["candidate"])
Пример #6
0
 def setUp(self):
     self.candidate = create_candidate_with_active_profile(
         test_user_data["candidate"])
     self.browser = webdriver.Firefox()
     self.browser.implicitly_wait(10)