How to use the deal.offline function in deal

To help you get started, we’ve selected a few deal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github life4 / deal / tests.py View on Github external
        @deal.offline(exception=KeyError)
        def func(do):
            if do:
                http = urllib3.PoolManager()
                http.request('GET', 'http://httpbin.org/robots.txt')
github life4 / deal / tests / test_decorators / test_offline.py View on Github external
    @deal.offline(exception=KeyError)
    def func(do):
        if do:
            http = urllib3.PoolManager()
            http.request('GET', 'http://httpbin.org/robots.txt')
github life4 / deal / tests / test_aliases.py View on Github external
    @deal.offline()
    @deal.offline
    @deal.safe
    @deal.safe()
    @deal.silent
    @deal.silent()
    @deal.pure
    @deal.chain(deal.safe, deal.silent)
    def func(x: int) -> int:
        """docs were before docker
        """
        return x
github life4 / deal / tests / test_decorators / test_raises.py View on Github external
    @deal.offline
    def func(do, number):
        if do:
            http = urllib3.PoolManager()
            http.request('GET', 'http://httpbin.org/robots.txt')
        return 1 / number
github life4 / deal / tests / test_decorators / test_raises.py View on Github external
    @deal.offline
    async def func(do, number):
        if do:
            http = urllib3.PoolManager()
            http.request('GET', 'http://httpbin.org/robots.txt')
        return 1 / number
github life4 / deal / tests.py View on Github external
        @deal.offline
        def func(do, number):
            if do:
                http = urllib3.PoolManager()
                http.request('GET', 'http://httpbin.org/robots.txt')
            1 / number
github life4 / deal / tests / test_decorators / test_offline.py View on Github external
    @deal.offline
    def func(do):
        if do:
            http = urllib3.PoolManager()
            http.request('GET', 'http://httpbin.org/robots.txt')