#NEWLINE# def testTypeOfLookupTableNone( self ) : #NEWLINE# #INDENT# '\n            Test resolution of __typeof queries, for field in lookup table,\n            with None value\n        ' #NEWLINE# db = current . db #NEWLINE# uids = self . uids #NEWLINE# resource = current . s3db . resource ( 'typeof_hierarchy_reference' ) #NEWLINE# expr = FS ( 'typeof_hierarchy_id$name' ) . typeof ( None ) #NEWLINE# query = expr . query ( resource ) #NEWLINE# table = db . typeof_hierarchy #NEWLINE# expected_query = table . id . belongs ( set ( ) ) #NEWLINE# self . assertEquivalent ( query , expected_query ) #NEWLINE# expr = FS ( 'typeof_hierarchy_id$name' ) . typeof ( [ None ] ) #NEWLINE# query = expr . query ( self ) #NEWLINE# expected_query = table . id . belongs ( set ( ) ) #NEWLINE# self . assertEquivalent ( query , expected_query ) #NEWLINE# expr = FS ( 'typeof_hierarchy_id$name' ) . typeof ( [ None , 'Type 1-1-2' ] ) #NEWLINE# query = expr . query ( resource ) #NEWLINE# expected_query = ( table . id == uids [ 'HIERARCHY1-1-2' ] ) #NEWLINE# self . assertEquivalent ( query , expected_query )