#NEWLINE# def test_fields( self ) : #NEWLINE# #INDENT# s = parse_ismaster_response ( { #NEWLINE# #INDENT# 'ok' : 1 , #NEWLINE# 'ismaster' : False , #NEWLINE# 'secondary' : True , #NEWLINE# 'primary' : 'a:27017' , #NEWLINE# 'tags' : { #NEWLINE# #INDENT# 'a' : 'foo' , #NEWLINE# 'b' : 'baz' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'maxMessageSizeBytes' : 1 , #NEWLINE# 'maxBsonObjectSize' : 2 , #NEWLINE# 'maxWriteBatchSize' : 3 , #NEWLINE# 'minWireVersion' : 4 , #NEWLINE# 'maxWireVersion' : 5 , #NEWLINE# 'setName' : 'rs' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( SERVER_TYPE . RSSecondary , s . server_type ) #NEWLINE# self . assertEqual ( ( 'a' , 27017 ) , s . primary ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'a' : 'foo' , #NEWLINE# 'b' : 'baz' , #NEWLINE# #UNINDENT# } , s . tags ) #NEWLINE# self . assertEqual ( 1 , s . max_message_size ) #NEWLINE# self . assertEqual ( 2 , s . max_bson_size ) #NEWLINE# self . assertEqual ( 3 , s . max_write_batch_size ) #NEWLINE# self . assertEqual ( 4 , s . min_wire_version ) #NEWLINE# self . assertEqual ( 5 , s . max_wire_version )