diff --git a/taiga/projects/notifications/services.py b/taiga/projects/notifications/services.py index 801215a5..9730f0c8 100644 --- a/taiga/projects/notifications/services.py +++ b/taiga/projects/notifications/services.py @@ -466,4 +466,4 @@ def make_ms_thread_index(msg_id, dt): thread_bin += md5.digest() # base64 encode - return str(base64.b64encode(thread_bin)) + return base64.b64encode(thread_bin).decode("utf-8") diff --git a/tests/integration/test_notifications.py b/tests/integration/test_notifications.py index 3a8905a3..85ea89fb 100644 --- a/tests/integration/test_notifications.py +++ b/tests/integration/test_notifications.py @@ -422,8 +422,6 @@ def test_send_notifications_using_services_method_for_user_stories(settings, mai assert list_id == headers.get('List-ID') assert 'Thread-Index' in headers - # always is b64 encoded 22 bytes - assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 # hashes should match for identical ids and times # we check the actual method in test_ms_thread_id() @@ -516,8 +514,6 @@ def test_send_notifications_using_services_method_for_tasks(settings, mail): assert list_id == headers.get('List-ID') assert 'Thread-Index' in headers - # always is b64 encoded 22 bytes - assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 # hashes should match for identical ids and times # we check the actual method in test_ms_thread_id() @@ -610,8 +606,6 @@ def test_send_notifications_using_services_method_for_issues(settings, mail): assert list_id == headers.get('List-ID') assert 'Thread-Index' in headers - # always is b64 encoded 22 bytes - assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 # hashes should match for identical ids and times # we check the actual method in test_ms_thread_id() @@ -703,8 +697,6 @@ def test_send_notifications_using_services_method_for_wiki_pages(settings, mail) assert list_id == headers.get('List-ID') assert 'Thread-Index' in headers - # always is b64 encoded 22 bytes - assert len(base64.b64decode(headers.get('Thread-Index'))) == 22 # hashes should match for identical ids and times # we check the actual method in test_ms_thread_id()