def setUp(self): self.department = create_department(test_user_data["department"]) job_details = test_user_data["job_details"] job_details[0]["department"] = self.department job_details[1]["department"] = self.department self.job1 = Job.objects.create(**job_details[0]) self.job2 = Job.objects.create(**job_details[1])
def setUp(self): self.department = create_department(test_user_data["department"]) self.employer = create_employer(self.department, test_user_data["employer"]) self.user = self.employer.user self.inactive_user = create_user(test_user_data["candidate"], False, False)
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)
def test_non_department_employer_cannot_view_application(self): other_department = create_department(test_user_data["departments"][1]) create_employer(other_department, test_user_data["employers"][1]) self.client.login( email=test_user_data["employers"][1]["email"], password=test_user_data["employers"][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" )
def test_context_hides_department_profile_details_labels_if_not_exists(self): self.login_employer() self.department_with_no_profile = create_department( test_user_data["department_with_no_profile"] ) response = self.client.get( reverse( "department_details:department_detail", kwargs={"pk": self.department_with_no_profile.id}, ) ) self.assertEqual(response.status_code, 200) self.assertNotContains(response, "Description") self.assertNotContains(response, "Contact")
def setUp(self): self.department = create_department(test_user_data["department"])
def setUp(self): self.department = create_department(test_user_data["department"]) self.employer = create_employer(self.department, test_user_data["employer"]) self.browser = webdriver.Firefox() self.browser.implicitly_wait(10)
def setUp(self): self.department = create_department( test_user_data["department_with_no_profile"]) self.employer = create_employer(self.department, test_user_data["employer"])