-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: less amazon forwarding email validation (#960)
* refactor: less amazon forwarding email validation * formatting * remove unused import * more linting
- Loading branch information
Showing
2 changed files
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1528,10 +1528,11 @@ async def test_form_amazon_error( | |
result = await hass.config_entries.flow.async_configure( | ||
result["flow_id"], input_3 | ||
) | ||
assert result["type"] == "form" | ||
assert result["step_id"] == step_id_3 | ||
assert "Invalid domain for email: [email protected]" in caplog.text | ||
assert result["errors"] == {CONF_AMAZON_FWDS: "amazon_domain"} | ||
assert result["type"] == "create_entry" | ||
assert ( | ||
"Amazon domain found in email: [email protected], this may cause errors when searching emails." | ||
in caplog.text | ||
) | ||
|
||
|
||
@pytest.mark.parametrize( | ||
|
@@ -1641,7 +1642,6 @@ async def test_form_amazon_error_2( | |
assert result["type"] == "form" | ||
assert result["step_id"] == step_id_3 | ||
assert "Missing '@' in email address: amazon.com" in caplog.text | ||
assert "Invalid domain for email: amazon.com" in caplog.text | ||
assert result["errors"] == {CONF_AMAZON_FWDS: "invalid_email_format"} | ||
|
||
|
||
|