salmon-exabyte-11054
05/31/2023, 5:07 PMvictorious-lawyer-58417
05/31/2023, 5:09 PMsalmon-exabyte-11054
05/31/2023, 5:11 PM@step
def get_data_from_api(self):
# this API call I'd like to be mocked so I can control the response
results = make_api_call()
self.next(self.end)salmon-exabyte-11054
05/31/2023, 5:12 PMvictorious-lawyer-58417
05/31/2023, 5:16 PMsalmon-exabyte-11054
05/31/2023, 5:18 PMunittest.mock.patch to explore using Metaflow.
The library I use in our code is a combonation of VCR and unittest.mock.patchsalmon-exabyte-11054
06/01/2023, 8:48 PMmetaflow.runtime.NativeRuntime._launch_worker and metaflow.runtime.NativeRuntime._poll_workers which let me bypass calling subprocess and instead call back into cli.main . Would you be interested in taking a look?victorious-lawyer-58417
06/01/2023, 8:59 PMsalmon-exabyte-11054
06/02/2023, 6:47 PMsalmon-exabyte-11054
06/06/2023, 3:05 PMvictorious-lawyer-58417
06/06/2023, 4:03 PMsalmon-exabyte-11054
06/06/2023, 4:07 PMsalmon-exabyte-11054
06/06/2023, 6:47 PMstraight-shampoo-11124
06/07/2023, 1:34 AMsalmon-exabyte-11054
06/07/2023, 1:47 AM