Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymongo/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def validate_ok_for_update(update):
'document_class': validate_document_class,
'tz_aware': validate_boolean_or_string,
'uuidrepresentation': validate_uuid_representation,
'connect': validate_boolean,
'connect': validate_boolean_or_string,
'event_listeners': _validate_event_listeners
}

Expand Down
4 changes: 4 additions & 0 deletions test/test_uri_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_split_options(self):
self.assertRaises(ConfigurationError, split_options, 'foo')
self.assertRaises(ConfigurationError, split_options, 'foo=bar;foo')
self.assertTrue(split_options('ssl=true'))
self.assertTrue(split_options('connect=true'))
self.assertTrue(split_options('ssl_match_hostname=true'))

# Test Invalid URI options that should throw warnings.
Expand All @@ -118,6 +119,8 @@ def test_split_options(self):
'connectTimeoutMS=-1e100000', warn=True)
self.assertRaises(Warning, split_options,
'ssl=foo', warn=True)
self.assertRaises(Warning, split_options,
'connect=foo', warn=True)
self.assertRaises(Warning, split_options,
'ssl_match_hostname=foo', warn=True)

Expand Down Expand Up @@ -153,6 +156,7 @@ def test_split_options(self):
self.assertRaises(ValueError, split_options,
'connectTimeoutMS=-1e100000')
self.assertRaises(ValueError, split_options, 'ssl=foo')
self.assertRaises(ValueError, split_options, 'connect=foo')
self.assertRaises(ValueError, split_options, 'ssl_match_hostname=foo')
if not (sys.platform == "win32" and sys.version_info <= (2, 5)):
self.assertRaises(ValueError, split_options,
Expand Down