It's going to be quite a common occurrence for packages that depend on openapi-common to want to mock connections to test with canned responses. Instead of forcing every dependent package to write their own boilerplate code to do this, it would be nice to add this as functionality to this library.
For example, expose something like:
from ansys.openapi.common import testing
cxn = testing.ApiClientFactory('http://localhost").connect()
cxn.register_response(my_canned_response)
result = cxn.run(query) # Returns my_canned_response
I'm not suggesting that as the actual interface, there's probably a lot more complexity that's required. But something like that would help mocking out connections to remote resources for package authors.
It's going to be quite a common occurrence for packages that depend on openapi-common to want to mock connections to test with canned responses. Instead of forcing every dependent package to write their own boilerplate code to do this, it would be nice to add this as functionality to this library.
For example, expose something like:
I'm not suggesting that as the actual interface, there's probably a lot more complexity that's required. But something like that would help mocking out connections to remote resources for package authors.