#NEWLINE# def testFindEntries( self ) : #NEWLINE# #INDENT# '\n        Given a list of users and a starting point, entries should generate a\n        list of all entries for each user from that time until now.\n        ' #NEWLINE# start = check_entries . Command ( ) . find_start ( ) #NEWLINE# if ( start . day == 1 ) : #NEWLINE# #INDENT# start += relativedelta ( days = 1 ) #NEWLINE# #UNINDENT# all_users = check_entries . Command ( ) . find_users ( ) #NEWLINE# entries = check_entries . Command ( ) . find_entries ( diff , start ) #NEWLINE# today = ( timezone . now ( ) - relativedelta ( hour = 0 , minute = 0 , second = 0 , microsecond = 0 ) ) #NEWLINE# diff = ( today - start ) #NEWLINE# days_checked = diff . days #NEWLINE# total_entries = 0 #NEWLINE# while True : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# user_entries = next ( entries ) #NEWLINE# for entry in user_entries : #NEWLINE# #INDENT# total_entries += 1 #NEWLINE# #UNINDENT# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# expected_total = ( days_checked * len ( self . all_users ) ) #NEWLINE# self . assertEqual ( total_entries , expected_total ) #NEWLINE# return