crul icon indicating copy to clipboard operation
crul copied to clipboard

Support mocking for async methods

Open sckott opened this issue 7 years ago • 5 comments

Right now, mocking is only supported for HttpClient. Support it for if possible

  • Async
  • AsyncVaried

AsyncVaried is used inside of Async, so should just need to adjust AsyncVaried

sckott avatar May 16 '18 22:05 sckott

see local branch mock-async

It's not clear how to do this.

I can't see a way to mock the mutli curl api, but maybe it can be dumber than that ...

sckott avatar Feb 09 '19 04:02 sckott

ah, so is this a limit for http testing at the moment?

maelle avatar Feb 26 '20 11:02 maelle

yes, right now async requests can't be tested with webmockr or vcr

sckott avatar Feb 26 '20 16:02 sckott

Good to know!

maelle avatar Feb 26 '20 17:02 maelle

so just as a note, in ropenaq tests that uses async requests got skip_if_offline() :-)

maelle avatar Mar 24 '20 12:03 maelle