#NEWLINE# def test_result_type( self ) : #NEWLINE# #INDENT# single_result = pdb . get ( self . setup_key ) #NEWLINE# self . assertTrue ( isinstance ( single_result , db . Model ) ) #NEWLINE# dict_result = pdb . get ( self . setup_key , _result_type = 'dict' ) #NEWLINE# self . assertTrue ( isinstance ( dict_result , dict ) ) #NEWLINE# self . assertEqual ( dict_result . keys ( ) [ 0 ] , str ( self . setup_key ) ) #NEWLINE# self . assertEqual ( dict_result . values ( ) [ 0 ] . name , 'test' ) #NEWLINE# name_dict_result = pdb . get ( self . setup_key , _result_type = 'name_dict' ) #NEWLINE# self . assertTrue ( isinstance ( name_dict_result , dict ) ) #NEWLINE# self . assertEqual ( name_dict_result . keys ( ) [ 0 ] , self . setup_key . name ( ) ) #NEWLINE# self . assertEqual ( name_dict_result . values ( ) [ 0 ] . name , 'test' ) #NEWLINE# e1 = TestModel ( name = 'integer_test' ) #NEWLINE# k1 = pdb . put ( e1 ) #NEWLINE# name_dict_result = pdb . get ( k1 , _result_type = 'name_dict' ) #NEWLINE# self . assertTrue ( isinstance ( name_dict_result , dict ) ) #NEWLINE# self . assertEqual ( name_dict_result . keys ( ) [ 0 ] , str ( k1 . id ( ) ) ) #NEWLINE# self . assertEqual ( name_dict_result . values ( ) [ 0 ] . name , 'integer_test' )