Skip to content

Commit

Permalink
address @mgrimesix
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorcary committed Sep 5, 2024
1 parent f1bb577 commit 6591196
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/api2/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


def test_config_settings():
orig_config = call("mail.config")
payload = {
"fromemail": "[email protected]",
"outgoingserver": "mail.ixsystems.com",
Expand All @@ -11,7 +12,11 @@ def test_config_settings():
"smtp": True,
"user": "[email protected]"
}
call("mail.update", payload)
config = call("mail.config")
# test that payload is a subset of config
assert payload.items() <= config.items()
try:
call("mail.update", payload)
config = call("mail.config")
# test that payload is a subset of config
assert payload.items() <= config.items()
finally:
call("mail.update", {key: orig_config[key] for key in payload})
assert call("mail.config") == orig_config

0 comments on commit 6591196

Please sign in to comment.