[fix] CI test

This commit is contained in:
ljf 2021-05-11 12:08:00 +02:00
parent ad73c29dad
commit 8cf151668f
2 changed files with 3 additions and 3 deletions

View file

@ -590,5 +590,5 @@
"diagnosis_sshd_config_insecure": "Die SSH-Konfiguration wurde scheinbar manuell abgeändert, und ist unsicher, weil sie keine 'AllowGroups'- oder 'AllowUsers' -Direktiven für die Begrenzung des Zugriffs durch autorisierte Benutzer enthält.",
"backup_create_size_estimation": "Das Archiv wird etwa {size} Daten enthalten",
"app_restore_script_failed": "Im Wiederherstellungsskript der Anwendung ist ein Fehler aufgetreten",
"app_restore_failed": "Konnte {apps:s} nicht wiederherstellen: {error:s}"
"app_restore_failed": "Konnte {app:s} nicht wiederherstellen: {error:s}"
}

View file

@ -120,7 +120,7 @@ def test_import_user(mocker):
fieldnames = [u'username', u'firstname', u'lastname', u'password',
u'mailbox-quota', u'mail', u'mail-alias', u'mail-forward',
u'groups']
with BytesIO() as csv_io:
with StringIO() as csv_io:
writer = csv.DictWriter(csv_io, fieldnames, delimiter=';',
quotechar='"')
writer.writeheader()
@ -164,10 +164,10 @@ def test_export_user(mocker):
result = user_export()
should_be = "username;firstname;lastname;password;"
should_be += "mailbox-quota;mail;mail-alias;mail-forward;groups"
should_be += "\r\nbob;Bob;Snow;;0;bob@" + maindomain + ";;;apps"
should_be += "\r\nalice;Alice;White;;0;alice@" + maindomain + ";"
should_be += ','.join([alias + maindomain for alias in FIRST_ALIASES])
should_be += ";;dev"
should_be += "\r\nbob;Bob;Snow;;0;bob@" + maindomain + ";;;apps"
should_be += "\r\njack;Jack;Black;;0;jack@" + maindomain + ";;;"
assert result == should_be