#NEWLINE# def test_get_basic_counters( self ) : #NEWLINE# #INDENT# page = ( 'node:' + str ( self . node . _id ) ) #NEWLINE# d = { #NEWLINE# #INDENT# '$inc' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# d [ '$inc' ] [ 'total' ] = 5 #NEWLINE# d [ '$inc' ] [ 'unique' ] = 3 #NEWLINE# collection = self . db [ 'pagecounters' ] #NEWLINE# collection . update ( { #NEWLINE# #INDENT# '_id' : page , #NEWLINE# #UNINDENT# } , d , True , False ) #NEWLINE# count = analytics . get_basic_counters ( page , db = d . db ) #NEWLINE# assert_equal ( count , ( 3 , 5 ) )