pass
-class MailValidator():
+class MailValidator:
"""Class for validation of emails."""
def target_path(self, new_value=None):
:param bool in_target: whether the verified email is on the target side
If `in_target` is set to True we are getting the target id from the
- target list of a source email. Otherwise we assume a target email from
+ target list of a source email. Otherwise, we assume a target email from
a source list.
"""
if in_target:
X-Autotest-Signature for simpler recognition
of mail (if None do not add header)
:type autotest_signature: str or None
+ :param str subject: Subject of created mails
"""
text = 'This is an autogenerated email.\n'
if match_id is not None:
message_id = match_id.group(1).rstrip('\r\n')
if message_id == "":
- raise MissingEmailID("No id was found in target message %s so it "
- "cannot be properly matched"
- % (message_path))
+ raise MissingEmailID(f"No id was found in target message {message_path}, "
+ f"so it cannot be properly matched")
return message_id
def _default_compare_emails(self, source_email_path, target_email_path,