Beispiel #1
0
    def test_use_default_primary_field_without_original_message_available(
            self):
        mail_with_original_message = create(
            Builder('mail').with_message(MAIL_DATA).with_dummy_message())

        bumblebee_document = IBumblebeeDocument(mail_with_original_message)
        self.assertEqual('no-subject.eml',
                         bumblebee_document.get_primary_field().filename)
Beispiel #2
0
    def test_use_original_message_as_primary_field_if_available(self):
        mail_with_original_message = create(
            Builder('mail').with_message(
                MAIL_DATA).with_dummy_message().with_dummy_original_message())

        bumblebee_document = IBumblebeeDocument(mail_with_original_message)
        self.assertEqual('dummy.msg',
                         bumblebee_document.get_primary_field().filename)
    def test_use_default_primary_field_without_original_message_available(self):
        mail_with_original_message = create(Builder('mail')
                                            .with_message(MAIL_DATA)
                                            .with_dummy_message())

        bumblebee_document = IBumblebeeDocument(mail_with_original_message)
        self.assertEqual(
            'no-subject.eml',
            bumblebee_document.get_primary_field().filename)
    def test_use_original_message_as_primary_field_if_available(self):
        mail_with_original_message = create(Builder('mail')
                                            .with_message(MAIL_DATA)
                                            .with_dummy_message()
                                            .with_dummy_original_message())

        bumblebee_document = IBumblebeeDocument(mail_with_original_message)
        self.assertEqual(
            'dummy.msg',
            bumblebee_document.get_primary_field().filename)