PYTHON-2940 Fix spec tests that require DNSPython (#756)
This commit is contained in:
parent
a94916edf1
commit
d77c20497b
@ -24,7 +24,8 @@ sys.path[0:0] = [""]
|
||||
|
||||
from pymongo.common import INTERNAL_URI_OPTION_NAME_MAP, validate
|
||||
from pymongo.compression_support import _HAVE_SNAPPY
|
||||
from pymongo.uri_parser import parse_uri
|
||||
from pymongo.srv_resolver import _HAVE_DNSPYTHON
|
||||
from pymongo.uri_parser import parse_uri, SRV_SCHEME
|
||||
from test import clear_warning_registry, unittest
|
||||
|
||||
|
||||
@ -92,7 +93,8 @@ def create_test(test, test_workdir):
|
||||
compressors = (test.get('options') or {}).get('compressors', [])
|
||||
if 'snappy' in compressors and not _HAVE_SNAPPY:
|
||||
self.skipTest('This test needs the snappy module.')
|
||||
|
||||
if test['uri'].startswith(SRV_SCHEME) and not _HAVE_DNSPYTHON:
|
||||
self.skipTest("This test needs dnspython package.")
|
||||
valid = True
|
||||
warning = False
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user