#NEWLINE# @ pytest . mark . parametrize ( [ 'p_queue' , 'p_greenlets' ] , [ ( x1 + x2 ) for x1 in [ [ 'test_raw default test' ] ] for x2 in [ [ 2 ] ] ] ) #NEWLINE# def test_raw_mixed( worker , p_queue , p_greenlets ) : #NEWLINE# #INDENT# worker . start_deps ( ) #NEWLINE# worker . send_raw_tasks ( 'test_raw' , [ 'aaa' , 'bbb' , 'ccc' ] , start = False , block = False ) #NEWLINE# worker . send_task ( 'tests.tasks.general.MongoInsert' , { #NEWLINE# #INDENT# 'not_raw' : 'ddd' , #NEWLINE# #UNINDENT# } , start = False , block = False ) #NEWLINE# assert ( Queue ( 'test_raw' ) . size ( ) == 3 ) #NEWLINE# assert ( Queue ( 'default' ) . size ( ) == 1 ) #NEWLINE# worker . start ( flags = ( '--greenlets %s --config tests/fixtures/config-raw1.py' % p_greenlets ) , queues = p_queue , deps = False ) #NEWLINE# test_collection = worker . mongodb_logs . tests_inserts #NEWLINE# jobs_collection = worker . mongodb_jobs . mrq_jobs #NEWLINE# time . sleep ( 1 ) #NEWLINE# assert ( Queue ( 'test_raw' ) . size ( ) == 0 ) #NEWLINE# assert ( Queue ( 'default' ) . size ( ) == 0 ) #NEWLINE# assert ( test_collection . count ( ) == 4 ) #NEWLINE# assert ( jobs_collection . count ( ) == 4 ) #NEWLINE# assert ( jobs_collection . find ( { #NEWLINE# #INDENT# 'status' : 'success' , #NEWLINE# #UNINDENT# } ) . count ( ) == 4 ) #NEWLINE# assert list ( jobs_collection . find ( { #NEWLINE# #INDENT# 'status' : 'success' , #NEWLINE# #UNINDENT# } ) ) [ 0 ] [ 'worker' ]