def test_should_provide_different_capture_jobs_data_relative_to_user(self):
        create_capture_job(self.org_user)
        create_capture_job(self.regular_user)

        vm_data = self.successful_get(self.detail_url + 'capture_jobs/', user=self.org_user)
        reg_data = self.successful_get(self.detail_url + 'capture_jobs/', user=self.regular_user)

        self.assertEqual(vm_data.keys(), reg_data.keys())
        self.assertNotEqual(vm_data['objects'], reg_data['objects'])
    def test_should_provide_different_capture_jobs_data_relative_to_user(self):
        create_capture_job(self.org_user)
        create_capture_job(self.regular_user)

        vm_data = self.successful_get(self.detail_url + 'capture_jobs/', user=self.org_user)
        reg_data = self.successful_get(self.detail_url + 'capture_jobs/', user=self.regular_user)

        self.assertEqual(list(vm_data.keys()), list(reg_data.keys()))
        self.assertNotEqual(vm_data['objects'], reg_data['objects'])
Exemplo n.º 3
0
 def test_should_reject_capture_job_detail_for_other_user(self):
     job = create_capture_job(self.org_user)
     self.rejected_get(self.detail_url + 'capture_jobs/%s/' %
                       (job.link_id, ),
                       user=self.regular_user,
                       expected_status_code=403)
Exemplo n.º 4
0
 def test_should_allow_capture_job_detail(self):
     job = create_capture_job(self.org_user)
     self.successful_get(self.detail_url + 'capture_jobs/%s/' %
                         (job.link_id, ),
                         user=self.org_user)
 def test_should_reject_capture_job_detail_for_other_user(self):
     job = create_capture_job(self.org_user)
     self.rejected_get(self.detail_url + 'capture_jobs/%s/' % (job.link_id,), user=self.regular_user)
 def test_should_allow_capture_job_detail(self):
     job = create_capture_job(self.org_user)
     self.successful_get(self.detail_url + 'capture_jobs/%s/' % (job.link_id,), user=self.org_user)