This commit is contained in:
Son NK 2020-03-13 10:34:41 +01:00
parent be9d2cdbe3
commit e713efee98
4 changed files with 4 additions and 8 deletions

View File

@ -54,9 +54,7 @@ def mailbox_detail_route(mailbox_id):
):
flash(f"Email {new_email} already used", "error")
elif not can_be_used_as_personal_email(new_email):
flash(
"You cannot use this email address as your mailbox", "error",
)
flash("You cannot use this email address as your mailbox", "error")
else:
mailbox.new_email = new_email
db.session.commit()

View File

@ -406,9 +406,7 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> str:
# in this case Postfix will try to send a bounce report to original sender, which is
# the "reply email"
if envelope.mail_from == "<>":
LOG.error(
"Bounce when sending to alias %s, user %s", alias, gen_email.user,
)
LOG.error("Bounce when sending to alias %s, user %s", alias, gen_email.user)
handle_bounce(
alias, envelope, forward_email, gen_email, msg, smtp, user, mailbox_email

View File

@ -50,7 +50,7 @@ def test_create_custom_alias_without_note(flask_client):
r = flask_client.post(
url_for("api.new_custom_alias", hostname="www.test.com"),
headers={"Authentication": api_key.code},
json={"alias_prefix": "prefix", "alias_suffix": f".{word}@{EMAIL_DOMAIN}",},
json={"alias_prefix": "prefix", "alias_suffix": f".{word}@{EMAIL_DOMAIN}"},
)
assert r.status_code == 201

View File

@ -52,7 +52,7 @@ def test_custom_mode(flask_client):
r = flask_client.post(
url_for("api.new_random_alias", hostname="www.test.com", mode="uuid"),
headers={"Authentication": api_key.code},
json={"note": "test note",},
json={"note": "test note"},
)
assert r.status_code == 201