#NEWLINE# def test_get_team_email_address_returns_none_if_not_available( self ) : #NEWLINE# #INDENT# with contextlib . nested ( mock . patch ( 'paasta_tools.monitoring_tools.__get_monitoring_config_value' , autospec = True ) , mock . patch ( 'paasta_tools.monitoring_tools.get_sensu_team_data' , autospec = True ) , mock . patch ( 'paasta_tools.monitoring_tools.get_team' , autospec = True ) ) as ( mock_get_monitoring_config_value , mock_get_sensu_team_data , mock_get_team ) : #NEWLINE# #INDENT# mock_get_team . return_value = 'test_team' #NEWLINE# mock_get_monitoring_config_value . return_value = False #NEWLINE# mock_get_sensu_team_data . return_value = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# actual = monitoring_tools . get_team_email_address ( 'fake_service' ) #NEWLINE# assert ( mock_get_sensu_team_data is None )