1
0

Apply suggestions from code review

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
Travis Ralston
2025-05-02 11:02:17 -06:00
committed by GitHub
parent 960bb62788
commit 9766e110e4
3 changed files with 5 additions and 14 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ set to the value of `next_token`. This will return a new page.
If the endpoint does not return a `next_token` then there are no more reports to
paginate through.
**URL parameters:**
**Query parameters:**
* `limit`: integer - Is optional but is used for pagination, denoting the maximum number
of items to return in this call. Defaults to `100`.
-5
View File
@@ -11,11 +11,6 @@
# See the GNU Affero General Public License for more details:
# <https://www.gnu.org/licenses/agpl-3.0.html>.
#
# Originally licensed under the Apache License, Version 2.0:
# <http://www.apache.org/licenses/LICENSE-2.0>.
#
# [This file includes modifications made by New Vector Limited]
#
#
import logging
+4 -8
View File
@@ -11,12 +11,6 @@
# See the GNU Affero General Public License for more details:
# <https://www.gnu.org/licenses/agpl-3.0.html>.
#
# Originally licensed under the Apache License, Version 2.0:
# <http://www.apache.org/licenses/LICENSE-2.0>.
#
# [This file includes modifications made by New Vector Limited]
#
#
from typing import List
from twisted.test.proto_helpers import MemoryReactor
@@ -366,7 +360,7 @@ class RoomReportsTestCase(unittest.HomeserverTestCase):
"""Report a room"""
channel = self.make_request(
"POST",
"rooms/%s/report" % room_id,
f"/_matrix/client/v3/rooms/{room_id}/report",
{"reason": "this makes me sad"},
access_token=user_tok,
)
@@ -376,7 +370,7 @@ class RoomReportsTestCase(unittest.HomeserverTestCase):
"""Report a room, but omit reason"""
channel = self.make_request(
"POST",
"rooms/%s/report" % room_id,
f"/_matrix/client/v3/rooms/{room_id}/report",
{},
access_token=user_tok,
)
@@ -393,6 +387,8 @@ class RoomReportsTestCase(unittest.HomeserverTestCase):
self.assertIn("name", c)
self.assertIn("reason", c)
self.assertEqual(len(c.keys()), 7)
def test_count_correct_despite_table_deletions(self) -> None:
"""
Tests that the count matches the number of rows, even if rows in joined tables