#NEWLINE# def test_before_api_call( app ) : #NEWLINE# #INDENT# mock1 = mock . MagicMock ( ) #NEWLINE# mock2 = mock . MagicMock ( ) #NEWLINE# app . before_api_call ( mock1 ) #NEWLINE# app . before_api_call ( mock2 ) #NEWLINE# client = app . test_client #NEWLINE# client . mget ( 15 ) #NEWLINE# assert ( mock2 . call_count == 1 ) #NEWLINE# assert ( mock2 . call_count == 1 )