#NEWLINE# def test_scheduling( self ) : #NEWLINE# #INDENT# dt = datetime . datetime ( 2011 , 1 , 1 , 0 , 1 ) #NEWLINE# dt2 = datetime . datetime ( 2037 , 1 , 1 , 0 , 1 ) #NEWLINE# ad1 = modify_state . schedule ( args = ( 'k' , 'v' ) , eta = dt , convert_utc = False ) #NEWLINE# ad2 = modify_state . schedule ( args = ( 'k2' , 'v2' ) , eta = dt2 , convert_utc = False ) #NEWLINE# worker = self . consumer . _create_worker ( ) #NEWLINE# worker . loop ( ) #NEWLINE# self . assertTrue ( ( 'k' in state ) ) #NEWLINE# worker . loop ( ) #NEWLINE# self . assertFalse ( ( 'k2' in state ) ) #NEWLINE# self . assertTaskEvents ( ( 'started' , ad1 . task ) , ( 'finished' , ad1 . task ) , ( 'scheduled' , ad2 . task ) ) #NEWLINE# self . scheduler ( dt ) #NEWLINE# self . assertEqual ( len ( self . huey ) , 0 ) #NEWLINE# self . scheduler ( dt2 ) #NEWLINE# self . assertEqual ( len ( self . huey ) , 1 )