#NEWLINE# def test_raw_retry( worker ) : #NEWLINE# #INDENT# p_queue = 'testretry_raw' #NEWLINE# worker . start ( flags = '--greenlets 10 --config tests/fixtures/config-raw1.py' , queues = p_queue ) #NEWLINE# jobs_collection = worker . mongodb_jobs . mrq_jobs #NEWLINE# assert ( jobs_collection . count ( ) == 0 ) #NEWLINE# assert ( Queue ( p_queue ) . size ( ) == 0 ) #NEWLINE# worker . send_raw_tasks ( p_queue , [ 0 ] , block = True ) #NEWLINE# failjob = list ( jobs_collection . find ( ) ) [ 0 ] #NEWLINE# assert ( Queue ( 'default' ) . size ( ) == 0 ) #NEWLINE# assert ( Queue ( 'testx' ) . size ( ) == 1 ) #NEWLINE# assert ( Queue ( p_queue ) . size ( ) == 0 ) #NEWLINE# assert ( jobs_collection . count ( ) == 1 ) #NEWLINE# assert ( failjob [ 'status' ] == 'queued' ) #NEWLINE# assert ( failjob [ 'queue' ] == 'testx' )