#NEWLINE# def test_get_value_basic( ) : #NEWLINE# #INDENT# ( field , multifield ) = ( fields . Field ( ) , fields . List ( fields . Str ( ) ) ) #NEWLINE# assert ( get_value ( { #NEWLINE# #INDENT# 'foo' : 42 , #NEWLINE# #UNINDENT# } , 'foo' , field ) == 42 ) #NEWLINE# assert ( get_value ( { #NEWLINE# #INDENT# 'foo' : 42 , #NEWLINE# #UNINDENT# } , 'bar' , multifield ) is missing ) #NEWLINE# assert ( get_value ( { #NEWLINE# #INDENT# 'foos' : [ 'a' , 'b' ] , #NEWLINE# #UNINDENT# } , 'foos' , multifield ) == [ 'a' , 'b' ] ) #NEWLINE# assert ( get_value ( { #NEWLINE# #INDENT# 'foos' : [ 'a' , 'b' ] , #NEWLINE# #UNINDENT# } , 'bar' , multifield ) is missing )