#NEWLINE# def test_index_separator( self ) : #NEWLINE# #INDENT# class CustomSeparator ( BaseModel ) : #NEWLINE# #INDENT# index_separator = '$' #NEWLINE# name = TextField ( primary_key = True ) #NEWLINE# data = IntegerField ( index = True ) #NEWLINE# #UNINDENT# CustomSeparator . create ( name = 'huey.zai' , data = 3 ) #NEWLINE# CustomSeparator . create ( name = 'michael.nuggie' , data = 5 ) #NEWLINE# keys = sorted ( db . keys ( ) ) #NEWLINE# self . assertEquivalent ( keys , [ 'test|customseparator:all' , 'test|customseparator:data$absolute$3' , 'test|customseparator:data$absolute$5' , 'test|customseparator:data$continuous' , 'test|customseparator:id$huey.zai' , 'test|customseparator:id$michael.nuggie' , 'test|customseparator:name$absolute$huey.zai' , 'test|customseparator:name$absolute$michael.nuggie' ] ) #NEWLINE# huey = CustomSeparator . get ( ( CustomSeparator . data < 5 ) ) #NEWLINE# self . assertEquivalent ( huey . name , 'huey.zai' ) #NEWLINE# mickey = CustomSeparator . load ( 'michael.nuggie' ) #NEWLINE# self . assertEquivalent ( mickey . data , 5 )