[Backport] Fix a problem with mandrill email backend (the good solution)

remotes/origin/issue/4795/notification_even_they_are_disabled
David Barragán Merino 2016-02-23 15:10:06 +01:00
parent 334282f263
commit 096f1458a6
2 changed files with 1 additions and 9 deletions

View File

@ -466,4 +466,4 @@ def make_ms_thread_index(msg_id, dt):
thread_bin += md5.digest() thread_bin += md5.digest()
# base64 encode # base64 encode
return str(base64.b64encode(thread_bin)) return base64.b64encode(thread_bin).decode("utf-8")

View File

@ -422,8 +422,6 @@ def test_send_notifications_using_services_method_for_user_stories(settings, mai
assert list_id == headers.get('List-ID') assert list_id == headers.get('List-ID')
assert 'Thread-Index' in headers 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 # hashes should match for identical ids and times
# we check the actual method in test_ms_thread_id() # 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 list_id == headers.get('List-ID')
assert 'Thread-Index' in headers 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 # hashes should match for identical ids and times
# we check the actual method in test_ms_thread_id() # 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 list_id == headers.get('List-ID')
assert 'Thread-Index' in headers 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 # hashes should match for identical ids and times
# we check the actual method in test_ms_thread_id() # 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 list_id == headers.get('List-ID')
assert 'Thread-Index' in headers 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 # hashes should match for identical ids and times
# we check the actual method in test_ms_thread_id() # we check the actual method in test_ms_thread_id()