Skip to content

[IMP] fetchmail_incoming_test: replay a raw email file - #240

Open
divad1196 wants to merge 1 commit into
OCA:18.0from
camptocamp:fetchmail_incoming_test_load_eml
Open

[IMP] fetchmail_incoming_test: replay a raw email file#240
divad1196 wants to merge 1 commit into
OCA:18.0from
camptocamp:fetchmail_incoming_test_load_eml

Conversation

@divad1196

Copy link
Copy Markdown
Contributor

Improvment from #235

Context

We don't always want to setup an incoming mail server and/or configure our mail client for our tests.
.. and sometimes we already have mails in an .eml format.

What the PR adds

This module adds a wizard to test emails by uploading an .eml file.

@OCA-git-bot OCA-git-bot added series:18.0 mod:fetchmail_incoming_test Module fetchmail_incoming_test labels Aug 7, 2026
@divad1196
divad1196 marked this pull request as draft August 7, 2026 12:13
@divad1196
divad1196 force-pushed the fetchmail_incoming_test_load_eml branch from 359897f to 1f1ae2d Compare August 7, 2026 12:21
@divad1196
divad1196 marked this pull request as ready for review August 7, 2026 12:21

@simahawk simahawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition! Pre-approving

# action_process really feeds message_process instead of swallowing the
# email, without depending on any routable model.
raw = self._raw(f"no-such-alias@{self.domain.name}")
with self.assertRaises(ValueError):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use assertRaisesRegex to check the message

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Add a second wizard that takes a raw message file, usually a .eml
exported from a mail client, and feeds it to the gateway untouched.

Both wizards now share their action_process through a mixin.
@divad1196
divad1196 force-pushed the fetchmail_incoming_test_load_eml branch from 1f1ae2d to 7ef4709 Compare August 11, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:fetchmail_incoming_test Module fetchmail_incoming_test series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants