diff --git a/tests/storage/test_background_update.py b/tests/storage/test_background_update.py
index abf7d0564d..3f5bfa09d4 100644
--- a/tests/storage/test_background_update.py
+++ b/tests/storage/test_background_update.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
+from typing import List, Tuple, cast
from unittest.mock import AsyncMock, Mock
import yaml
@@ -526,15 +527,18 @@ class BackgroundUpdateValidateConstraintTestCase(unittest.HomeserverTestCase):
self.wait_for_background_updates()
# Check the correct values are in the new table.
- rows = self.get_success(
- self.store.db_pool.simple_select_list(
- table="test_constraint",
- keyvalues={},
- retcols=("a", "b"),
- )
+ rows = cast(
+ List[Tuple[int, int]],
+ self.get_success(
+ self.store.db_pool.simple_select_list(
+ table="test_constraint",
+ keyvalues={},
+ retcols=("a", "b"),
+ )
+ ),
)
- self.assertCountEqual(rows, [{"a": 1, "b": 1}, {"a": 3, "b": 3}])
+ self.assertCountEqual(rows, [(1, 1), (3, 3)])
# And check that invalid rows get correctly rejected.
self.get_failure(
@@ -640,14 +644,17 @@ class BackgroundUpdateValidateConstraintTestCase(unittest.HomeserverTestCase):
self.wait_for_background_updates()
# Check the correct values are in the new table.
- rows = self.get_success(
- self.store.db_pool.simple_select_list(
- table="test_constraint",
- keyvalues={},
- retcols=("a", "b"),
- )
+ rows = cast(
+ List[Tuple[int, int]],
+ self.get_success(
+ self.store.db_pool.simple_select_list(
+ table="test_constraint",
+ keyvalues={},
+ retcols=("a", "b"),
+ )
+ ),
)
- self.assertCountEqual(rows, [{"a": 1, "b": 1}, {"a": 3, "b": 3}])
+ self.assertCountEqual(rows, [(1, 1), (3, 3)])
# And check that invalid rows get correctly rejected.
self.get_failure(
|