Example #1
0
 def test_job_with_id(self):
     """Test creating a job with an id."""
     Honeywell.load_account()
     backend = Honeywell.get_backend(self.backend_name)
     job = self._submit_job()
     job_id = job.job_id()
     credentials = backend.provider().credentials
     job_created_with_id = HoneywellJob(backend, job_id, self.api_cls(credentials))
     result = job_created_with_id.result()
     self.assertEqual(result.success, True)
     return result
Example #2
0
 def _submit_job(self):
     """Helper method to submit job and return job instance"""
     Honeywell.load_account()
     backend = Honeywell.get_backend(self.backend_name)
     return execute(self.circuit, backend)
Example #3
0
 def test_status(self):
     """Test backend.status()."""
     Honeywell.load_account()
     backend = Honeywell.get_backend(self.backend_name)
     status = backend.status()
     self.assertIsInstance(status, BackendStatus)
Example #4
0
 def test_name(self):
     """Test backend.name()."""
     Honeywell.load_account()
     backend = Honeywell.get_backend(self.backend_name)
     name = backend.name()
     self.assertEqual(name, self.backend_name)
Example #5
0
 def test_provider(self):
     """Test backend.provider()."""
     Honeywell.load_account()
     backend = Honeywell.get_backend(self.backend_name)
     provider = backend.provider()
     self.assertEqual(provider, self.provider_cls())