#NEWLINE# @ client_context . require_ipv6 #NEWLINE# def test_ipv6( self ) : #NEWLINE# #INDENT# if client_context . auth_enabled : #NEWLINE# #INDENT# auth_str = ( '%s:%s@' % ( db_user , db_pwd ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# auth_str = '' #NEWLINE# #UNINDENT# uri = ( 'mongodb://%s[::1]:%d' % ( auth_str , port ) ) #NEWLINE# if client_context . is_rs : #NEWLINE# #INDENT# uri += ( '/?replicaSet=' + client_context . replica_set_name ) #NEWLINE# #UNINDENT# client = rs_or_single_client_noauth ( self ) #NEWLINE# client . pymongo_test . test . insert_one ( { #NEWLINE# #INDENT# 'dummy' : u ( 'object' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# client . pymongo_test_bernie . test . insert_one ( { #NEWLINE# #INDENT# 'dummy' : u ( 'object' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# dbs = client . database_names ( ) #NEWLINE# self . assertTrue ( ( 'pymongo_test' in dbs ) ) #NEWLINE# self . assertTrue ( ( 'pymongo_test_bernie' in dbs ) )