Allow to use functions which internally requests without Click and its context
Since Click migration (v0.7.0), It is not possible to use a function which internally make a request. For external usage and tests without Click is not possible.
EndPoint class is coupled with Click context
pass_context for custom endpoint or GTEST usage for BMA api string generation.
- Write tests which requires requests is not possible (most of the tests)
- @tuxmain to use the transaction functions for ĞMixer and other projects to take advantages of Silkaj code.
RuntimeErrorto detect that there is no Click context in case Click is installed and loaded
ModuleNotFoundErrorin case Click is not installed
- Previous point requires Python ≥ 3.6, and I didn’t found a way to import it with
__future__for Python 3.5 support.
- To keep Python 3.5 support, I can just check for general exception for now. And, when Silkaj will drop Python 3.5, we could add back
EndPoint().BMA_ENDPOINTwith click context
EndPoint().BMA_ENDPOINTwithout click context
- Figure out how to test a singleton function
- Test with Python 3.5: Not found how to simulate missing module