tests: Improve code formatting

This commit is contained in:
Alexandre Aubin 2021-08-26 20:31:20 +02:00
parent 16f564622e
commit efec34a3a6

View file

@ -162,14 +162,13 @@ def test_import_user(mocker):
def test_export_user(mocker): def test_export_user(mocker):
result = user_export() result = user_export()
should_be = "username;firstname;lastname;password;" aliases = ','.join([alias + maindomain for alias in FIRST_ALIASES])
should_be += "mailbox-quota;mail;mail-alias;mail-forward;groups" should_be = (
should_be += "\r\nalice;Alice;White;;0;alice@" + maindomain + ";" "username;firstname;lastname;password;mailbox-quota;mail;mail-alias;mail-forward;groups\r\n"
should_be += ','.join([alias + maindomain for alias in FIRST_ALIASES]) f"alice;Alice;White;;0;alice@{maindomain};{aliases};;dev\r\n"
should_be += ";;dev" f"bob;Bob;Snow;;0;bob@{maindomain};;;apps\r\n"
should_be += "\r\nbob;Bob;Snow;;0;bob@" + maindomain + ";;;apps" f"jack;Jack;Black;;0;jack@{maindomain};;;"
should_be += "\r\njack;Jack;Black;;0;jack@" + maindomain + ";;;" )
assert result == should_be assert result == should_be