summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2021-12-21 07:59:09 -0800
committerBob Halley <halley@dnspython.org>2021-12-21 07:59:09 -0800
commitec5bee76861f3da38dd6b72f01c28ea888a346c8 (patch)
tree804c5bb7959335f8a19e14cebd24337bbc9aa03b /tests
parentd2b4a140d6da9d2d60570152a2507d96614b1326 (diff)
downloaddnspython-ec5bee76861f3da38dd6b72f01c28ea888a346c8.tar.gz
skip async DoH tests if no httpx
Diffstat (limited to 'tests')
-rw-r--r--tests/test_async.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index c7425e6..4759b02 100644
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -428,6 +428,7 @@ class AsyncTests(unittest.TestCase):
self.async_run(arun)
self.assertRaises(dns.exception.Timeout, run)
+ @unittest.skipIf(not dns.query._have_httpx, "httpx not available")
def testDOHGetRequest(self):
if self.backend.name() == 'curio':
self.skipTest('anyio dropped curio support')
@@ -439,6 +440,7 @@ class AsyncTests(unittest.TestCase):
self.assertTrue(q.is_response(r))
self.async_run(run)
+ @unittest.skipIf(not dns.query._have_httpx, "httpx not available")
def testDOHGetRequestHttp1(self):
if self.backend.name() == 'curio':
self.skipTest('anyio dropped curio support')
@@ -455,6 +457,7 @@ class AsyncTests(unittest.TestCase):
dns.query._have_http2 = saved_have_http2
self.async_run(run)
+ @unittest.skipIf(not dns.query._have_httpx, "httpx not available")
def testDOHPostRequest(self):
if self.backend.name() == 'curio':
self.skipTest('anyio dropped curio support')
@@ -466,7 +469,8 @@ class AsyncTests(unittest.TestCase):
self.assertTrue(q.is_response(r))
self.async_run(run)
- def test_resolver_doh(self):
+ @unittest.skipIf(not dns.query._have_httpx, "httpx not available")
+ def testResolverDOH(self):
if self.backend.name() == 'curio':
self.skipTest('anyio dropped curio support')
async def run():