#NEWLINE# def test_simple_aggregate_query( self ) : #NEWLINE# #INDENT# st = self . sa_star1 . alias ( 't0' ) #NEWLINE# cases = self . _case_simple_aggregate_query ( ) #NEWLINE# metric = F . sum ( st . c . f ) . label ( 'total' ) #NEWLINE# k1 = self . c . foo_id #NEWLINE# k2 = st . c . bar_id #NEWLINE# expected = [ sa . select ( [ k1 , metric ] ) . group_by ( k1 ) , sa . select ( [ k1 , k2 , metric ] ) . group_by ( k1 , k2 ) ] #NEWLINE# for ( case , ex_sqla ) in zip ( cases , expected ) : #NEWLINE# #INDENT# self . _compare_sqla ( case , ex_sqla )