#NEWLINE# @ skip ( 'Fix mocks' ) #NEWLINE# def test_fetch_cases( self ) : #NEWLINE# #INDENT# with patch ( 'custom.dhis2.tasks.get_children_only_theirs' ) as only_theirs_mock , patch ( 'custom.dhis2.tasks.pull_child_entities' ) as pull_mock , patch ( 'custom.dhis2.tasks.gen_children_only_ours' ) as only_ours_mock , patch ( 'custom.dhis2.tasks.push_child_entities' ) as push_mock : #NEWLINE# #INDENT# foo = object ( ) #NEWLINE# bar = object ( ) #NEWLINE# only_theirs_mock . return_value = only_theirs_mock #NEWLINE# only_ours_mock . return_value = bar #NEWLINE# fetch_cases ( ) #NEWLINE# only_theirs_mock . assert_called ( ) #NEWLINE# pull_mock . assert_called_with ( DOMAIN , foo ) #NEWLINE# only_ours_mock . assert_called_with ( DOMAIN ) #NEWLINE# push_mock . assert_called_with ( bar )