#NEWLINE# def test_submit_job( self ) : #NEWLINE# #INDENT# source = Mock ( chunks = 1 , isfile = True ) #NEWLINE# mp = self . _makeit ( Mock ( ) , source , 'foo' ) #NEWLINE# with patch . object ( mp , 'do_part' ) as do_part : #NEWLINE# #INDENT# do_part . return_value = 'FooKey' #NEWLINE# rs = mp . submit_job ( monoprocessing . Pool ( ) ) #NEWLINE# self . assertEqual ( 'FooKey' , next ( do_part ) ) #NEWLINE# with ExpectedException ( StopIteration ) : #NEWLINE# #INDENT# next ( rs )