Blame grpc-1.40.0-python-grpcio_tests-make-network-tests-skippable.patch

0b8f8cd
diff -Naur grpc-1.40.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py grpc-1.40.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py
0b8f8cd
--- grpc-1.40.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py	2021-09-03 19:20:52.000000000 -0400
0b8f8cd
+++ grpc-1.40.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py	2021-09-09 10:55:12.919416808 -0400
0b8f8cd
@@ -14,6 +14,7 @@
ce88e01
 """Tests for an actual dns resolution."""
ce88e01
 
0b8f8cd
 import logging
ce88e01
+import os
ce88e01
 import unittest
0b8f8cd
 
0b8f8cd
 import grpc
0b8f8cd
@@ -46,6 +47,8 @@
ce88e01
     def tearDown(self):
ce88e01
         self._server.stop(None)
ce88e01
 
ce88e01
+    @unittest.skipIf('FEDORA_NO_NETWORK_TESTS' in os.environ,
ce88e01
+                     'Network tests disabled')
ce88e01
     def test_connect_loopback(self):
ce88e01
         # NOTE(https://github.com/grpc/grpc/issues/18422)
ce88e01
         # In short, Gevent + C-Ares = Segfault. The C-Ares driver is not