Beispiel #1
0
 def remote_submit_job(self, url, data, timeout, headers=None):
     with requests_mock.Mocker() as mock:
         resp = {"job_id": dummy_uuid, "qlength": 2}
         resp = json.dumps(resp)
         mock.register_uri("POST", url, text=resp)
         self.last_posted = data
         return Compute.remote_submit_job(self, url, data, timeout)
 def remote_submit_job(self, url, data, timeout, headers=None):
     print("mocking:", url)
     with requests_mock.Mocker() as mock:
         resp = {"task_id": str(uuid.uuid4())}
         resp = json.dumps(resp)
         print("mocking", url)
         mock.register_uri("POST", url, text=resp)
         self.last_posted = data
         return Compute.remote_submit_job(self, url, data, timeout)