From 4ec0a25ab5dad174655099e3067c16e8680f8172 Mon Sep 17 00:00:00 2001 From: Spitfireap Date: Sat, 27 Jul 2024 12:19:45 +0200 Subject: [PATCH] Optimized test for RFC5321 Co-Authored-By: Christophe CHAUVET --- modoboa/admin/api/v2/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/admin/api/v2/tests.py b/modoboa/admin/api/v2/tests.py index bb7d51598..006b49dc5 100644 --- a/modoboa/admin/api/v2/tests.py +++ b/modoboa/admin/api/v2/tests.py @@ -211,7 +211,7 @@ class AccountViewSetTestCase(ModoAPITestCase): def test_create_too_long_username(self): """Test that it is not possible to create too long usernames (RFC5321).""" url = reverse("v2:account-list") - toolong_username = "".join(["a" for i in range(66)]) + toolong_username = "a" * 66 data = { "username": f"{toolong_username}@test.com", "role": "SimpleUsers",