def create_job(distro, bug, grantee, owner):
     job = getUtility(IRemoveArtifactSubscriptionsJobSource).create(
         owner, [bug])
     with person_logged_in(owner):
         bug.transitionToInformationType(
                     InformationType.PRIVATESECURITY, owner)
     return job, IRemoveArtifactSubscriptionsJobSource.getName()
 def create_job(distro, bug, grantee, owner):
     job = getUtility(IRemoveArtifactSubscriptionsJobSource).create(
         owner, [bug])
     with person_logged_in(owner):
         bug.transitionToInformationType(
             InformationType.PRIVATESECURITY, owner)
     return job, IRemoveArtifactSubscriptionsJobSource.getName()
 def test_create(self):
     # Create an instance of RemoveArtifactSubscriptionsJob.
     self.assertIs(
         True,
         IRemoveArtifactSubscriptionsJobSource.providedBy(
             RemoveArtifactSubscriptionsJob))
     self.assertEqual(SharingJobType.REMOVE_ARTIFACT_SUBSCRIPTIONS,
                      RemoveArtifactSubscriptionsJob.class_job_type)
     requestor = self.factory.makePerson()
     bug = self.factory.makeBug()
     job = getUtility(IRemoveArtifactSubscriptionsJobSource).create(
         requestor, [bug])
     naked_job = removeSecurityProxy(job)
     self.assertIsInstance(job, RemoveArtifactSubscriptionsJob)
     self.assertEqual(requestor.id, naked_job.requestor_id)
     self.assertContentEqual([bug.id], naked_job.bug_ids)
 def test_create(self):
     # Create an instance of RemoveArtifactSubscriptionsJob.
     self.assertIs(
         True,
         IRemoveArtifactSubscriptionsJobSource.providedBy(
             RemoveArtifactSubscriptionsJob))
     self.assertEqual(
         SharingJobType.REMOVE_ARTIFACT_SUBSCRIPTIONS,
         RemoveArtifactSubscriptionsJob.class_job_type)
     requestor = self.factory.makePerson()
     bug = self.factory.makeBug()
     job = getUtility(IRemoveArtifactSubscriptionsJobSource).create(
         requestor, [bug])
     naked_job = removeSecurityProxy(job)
     self.assertIsInstance(job, RemoveArtifactSubscriptionsJob)
     self.assertEqual(requestor.id, naked_job.requestor_id)
     self.assertContentEqual([bug.id], naked_job.bug_ids)