Skip to content

Commit 99afc12

Browse files
committed
Fix test error codes
1 parent d61234d commit 99afc12

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/rest/client/test_thread_subscriptions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from twisted.internet.testing import MemoryReactor
1717

18+
from synapse.api.errors import Codes
1819
from synapse.rest import admin
1920
from synapse.rest.client import login, profile, room, thread_subscriptions
2021
from synapse.server import HomeServer
@@ -277,7 +278,7 @@ def test_auto_subscribe_cause_event_not_in_thread(self) -> None:
277278
access_token=self.token,
278279
)
279280
self.assertEqual(channel.code, HTTPStatus.BAD_REQUEST, channel.text_body)
280-
self.assertEqual(channel.json_body["errcode"], "M_NOT_IN_THREAD")
281+
self.assertEqual(channel.json_body["errcode"], Codes.MSC4306_NOT_IN_THREAD)
281282

282283
def test_auto_resubscription_conflict(self) -> None:
283284
"""
@@ -301,7 +302,9 @@ def test_auto_resubscription_conflict(self) -> None:
301302
)
302303
self.assertEqual(channel.code, HTTPStatus.CONFLICT, channel.text_body)
303304
self.assertEqual(
304-
channel.json_body["errcode"], "M_SKIPPED", channel.text_body
305+
channel.json_body["errcode"],
306+
Codes.MSC4306_CONFLICTING_UNSUBSCRIPTION,
307+
channel.text_body,
305308
)
306309

307310
# Check the subscription was not made

0 commit comments

Comments
 (0)