How to use the aiodns.error.ARES_ECANCELLED function in aiodns

To help you get started, we’ve selected a few aiodns 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 saghul / aiodns / tests.py View on Github external
def test_query_cancel(self):
        f = self.resolver.query('google.com', 'A')
        self.resolver.cancel()
        try:
            self.loop.run_until_complete(f)
        except aiodns.error.DNSError as e:
            self.assertEqual(e.args[0], aiodns.error.ARES_ECANCELLED)

aiodns

Simple DNS resolver for asyncio

MIT
Latest version published 1 month ago

Package Health Score

85 / 100
Full package analysis

Similar packages