]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
skip async DoH tests if no httpx v2.2.0rc1
authorBob Halley <halley@dnspython.org>
Tue, 21 Dec 2021 15:59:09 +0000 (07:59 -0800)
committerBob Halley <halley@dnspython.org>
Tue, 21 Dec 2021 15:59:28 +0000 (07:59 -0800)
(cherry picked from commit ec5bee76861f3da38dd6b72f01c28ea888a346c8)

tests/test_async.py

index c7425e61b457c21a5766642838ce25dec7e50456..4759b029c2dee07d7adeba9aef6a69f6b6e63995 100644 (file)
@@ -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():