File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -552,7 +552,6 @@ def parse_uri(
552
552
553
553
if __name__ == "__main__" :
554
554
import pprint
555
- import sys
556
555
557
556
try :
558
557
pprint .pprint (parse_uri (sys .argv [1 ]))
Original file line number Diff line number Diff line change @@ -1650,6 +1650,11 @@ def server_description_count():
1650
1650
# AssertionError: 4 != 22 within 5 delta (18 difference)
1651
1651
self .assertAlmostEqual (initial_count , final_count , delta = 10 )
1652
1652
1653
+ @unittest .skipIf (_HAVE_DNSPYTHON , "dnspython must not be installed" )
1654
+ def test_srv_no_dnspython_error (self ):
1655
+ with self .assertRaisesRegex (ConfigurationError , 'The "dnspython" module must be' ):
1656
+ MongoClient ("mongodb+srv://test1.test.build.10gen.cc/" )
1657
+
1653
1658
1654
1659
class TestExhaustCursor (IntegrationTest ):
1655
1660
"""Test that clients properly handle errors from exhaust cursors."""
You can’t perform that action at this time.
0 commit comments