mail_deduplicate.tests package#
Submodules#
mail_deduplicate.tests.conftest module#
- class mail_deduplicate.tests.conftest.MailFactory(**custom_fields)[source]#
Bases:
object
Create fake mail messages to serve as unittest fixtures.
Help production of either random, customized or deterministic mail message.
Init the mail with custom fields.
You can bypass data normalization by passing the pre-formated date string with
date_rfc2822
custom field instead ofdate
.
- mail_deduplicate.tests.conftest.make_box(tmp_path)[source]#
A generic fixture to produce a temporary box of mails.
The mail container can be created in any format supported by Python standard library, by the way of the
box_type
parameter. Supported values: onlyMaildir
andmbox
for the moment.
- mail_deduplicate.tests.conftest.check_box(box_path, box_type, content=None)[source]#
Check the content of a mail box (in any of maildir of mbox format).
Does not use
set()
types internally to avoid silent deduplication. Translates all mails provided tomailbox.Message
instances to provide fair comparison in a normalized space.
mail_deduplicate.tests.test_action module#
mail_deduplicate.tests.test_cli module#
- mail_deduplicate.tests.test_cli.test_early_export_file_check(invoke, make_box, tmp_path)[source]#
Ensures the export file is tested for existence before any process is ran.
See: https://github.com/kdeldycke/mail-deduplicate/issues/119
mail_deduplicate.tests.test_mail module#
mail_deduplicate.tests.test_mail_box module#
mail_deduplicate.tests.test_strategy module#
- mail_deduplicate.tests.test_strategy.test_strategy_definitions()[source]#
Test deduplication strategy definitions.