#NEWLINE# def test_apply_expression( self ) : #NEWLINE# #INDENT# expression = 'facts.test := union(facts.test, "test")' #NEWLINE# node = self . _model_get_by_id ( 'nodes' , self . nodes [ 'node-1' ] [ 'id' ] ) #NEWLINE# self . assertFalse ( ( 'test' in node [ 'facts' ] ) ) #NEWLINE# ast . apply_expression ( self . nodes [ 'node-1' ] [ 'id' ] , expression , api ) #NEWLINE# node = self . _model_get_by_id ( 'nodes' , self . nodes [ 'node-1' ] [ 'id' ] ) #NEWLINE# self . assertTrue ( ( 'test' in node [ 'facts' ] ) ) #NEWLINE# self . assertEquals ( expression [ 'facts' ] [ 'test' ] , [ 'test' ] )