mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-03 17:34:11 -04:00
Create function to check for long names in devices (#8364)
* Create a new function to verify that the length of a device name is under a certain threshold. * Refactor old code and tests to use said function. * Verify device name length during registration of device * Add a test for the above Signed-off-by: Dionysis Grigoropoulos <dgrig@erethon.com>
This commit is contained in:
parent
4f3096d866
commit
37ca5924bd
4 changed files with 38 additions and 7 deletions
|
@ -221,7 +221,7 @@ class DeviceRestTestCase(unittest.HomeserverTestCase):
|
|||
self.render(request)
|
||||
|
||||
self.assertEqual(400, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(Codes.UNKNOWN, channel.json_body["errcode"])
|
||||
self.assertEqual(Codes.TOO_LARGE, channel.json_body["errcode"])
|
||||
|
||||
# Ensure the display name was not updated.
|
||||
request, channel = self.make_request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue