summary refs log tree commit diff
path: root/tests/storage/test_base.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-08-18 18:13:47 +0100
committerRichard van der Hoff <richard@matrix.org>2020-08-18 18:13:47 +0100
commitafe4c4e02e539861e36d6e080f2f5e33bd58f20d (patch)
treeabdef0313e40eec69fbd5d182cbe05fac44d11ed /tests/storage/test_base.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentAdd resources.consent conditional dependency back (#8107) (diff)
downloadsynapse-afe4c4e02e539861e36d6e080f2f5e33bd58f20d.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'tests/storage/test_base.py')
-rw-r--r--tests/storage/test_base.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py

index efcaeef1e7..13bcac743a 100644 --- a/tests/storage/test_base.py +++ b/tests/storage/test_base.py
@@ -66,8 +66,10 @@ class SQLBaseStoreTestCase(unittest.TestCase): def test_insert_1col(self): self.mock_txn.rowcount = 1 - yield self.datastore.db_pool.simple_insert( - table="tablename", values={"columname": "Value"} + yield defer.ensureDeferred( + self.datastore.db_pool.simple_insert( + table="tablename", values={"columname": "Value"} + ) ) self.mock_txn.execute.assert_called_with( @@ -78,10 +80,12 @@ class SQLBaseStoreTestCase(unittest.TestCase): def test_insert_3cols(self): self.mock_txn.rowcount = 1 - yield self.datastore.db_pool.simple_insert( - table="tablename", - # Use OrderedDict() so we can assert on the SQL generated - values=OrderedDict([("colA", 1), ("colB", 2), ("colC", 3)]), + yield defer.ensureDeferred( + self.datastore.db_pool.simple_insert( + table="tablename", + # Use OrderedDict() so we can assert on the SQL generated + values=OrderedDict([("colA", 1), ("colB", 2), ("colC", 3)]), + ) ) self.mock_txn.execute.assert_called_with(