From 2eef5ce7163c9cf0587db6ca03a0d076d3222abe Mon Sep 17 00:00:00 2001 From: Spitfireap Date: Mon, 15 Jul 2024 14:33:31 +0200 Subject: [PATCH] Fixed test --- modoboa/admin/api/v2/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modoboa/admin/api/v2/tests.py b/modoboa/admin/api/v2/tests.py index b70dfe073..bb7d51598 100644 --- a/modoboa/admin/api/v2/tests.py +++ b/modoboa/admin/api/v2/tests.py @@ -213,7 +213,7 @@ class AccountViewSetTestCase(ModoAPITestCase): url = reverse("v2:account-list") toolong_username = "".join(["a" for i in range(66)]) data = { - "username": toolong_username, + "username": f"{toolong_username}@test.com", "role": "SimpleUsers", "mailbox": {"use_domain_quota": True}, "password": "Toto12345", @@ -224,7 +224,7 @@ class AccountViewSetTestCase(ModoAPITestCase): self.assertEqual(resp.status_code, 400) self.assertIn( "The left part of an email address can't be more than 64 characters", - resp.json(), + str(resp.json()), ) def test_validate(self):