def test_should_return_correct_notification_details_for_direct_delivery(self, mock_generate_exported_csv_file_name):
        file_name = 'direct_deliveries_1448892495779.csv'
        mock_generate_exported_csv_file_name.return_value = file_name
        category = 'delivery'
        direct_csv_export = DeliveryCSVExporter.create_delivery_exporter_by_type('Direct', self.HOSTNAME)
        export_label = direct_csv_export.export_label

        details = (EMAIL_COMMON_SUBJECT, EMAIL_NOTIFICATION_CONTENT.format(export_label,
                                                                           'http://ha.ha/static/exports/' + category +
                                                                           '/' + file_name, CSV_EXPIRED_HOURS))
        self.assertEqual(direct_csv_export.notification_details(), details)
示例#2
0
 def test_generate_delivery_feedback_report_should_return_correct_notification_details(self,
                                                                                       generate_exported_csv_file_name):
     file_name = 'deliveries_feedback_report_1448892495779.csv'
     generate_exported_csv_file_name.return_value = file_name
     delivery_feedback_report_csv_export = DeliveryFeedbackReportExporter(self.HOSTNAME)
     category = 'report/feedback'
     export_label = delivery_feedback_report_csv_export.export_label
     details = (EMAIL_COMMON_SUBJECT, EMAIL_NOTIFICATION_CONTENT.format(export_label,
                                                                        'http://ha.ha/static/exports/' + category +
                                                                        '/' + file_name, CSV_EXPIRED_HOURS))
     self.assertEqual(delivery_feedback_report_csv_export.notification_details(), details)
示例#3
0
    def test_should_return_correct_notification_details_for_direct_delivery(self, mock_generate_exported_csv_file_name):
        file_name = 'direct_deliveries_1448892495779.csv'
        mock_generate_exported_csv_file_name.return_value = file_name
        category = 'delivery'
        direct_csv_export = DeliveryCSVExporter.create_delivery_exporter_by_type('Direct', self.HOSTNAME)
        export_label = direct_csv_export.export_label

        details = (EMAIL_COMMON_SUBJECT, EMAIL_NOTIFICATION_CONTENT.format(export_label,
                                                                           'http://ha.ha/static/exports/' + category +
                                                                           '/' + file_name, CSV_EXPIRED_HOURS))
        self.assertEqual(direct_csv_export.notification_details(), details)