#NEWLINE# def test_when_clicking_login_button_controllers_handle_login_method_is_called( ) : #NEWLINE# #INDENT# login_view = factories . login_view ( '' , '' ) #NEWLINE# _ = mock . Mock ( ) #NEWLINE# login_controller = controllers . auth . LoginController ( login_view , _ , _ ) #NEWLINE# login_controller . handle_login_request = mock . Mock ( ) #NEWLINE# signals . emit ( login_view . login_button , 'click' ) #NEWLINE# assert ( login_controller . handle_login_request . call_count == 1 )