mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:14:48 -04:00
Fix daedlock
This commit is contained in:
parent
1d566edb81
commit
a2c4f3f150
7 changed files with 118 additions and 80 deletions
|
@ -33,8 +33,9 @@ class SQLBaseStoreTestCase(unittest.TestCase):
|
|||
def setUp(self):
|
||||
self.db_pool = Mock(spec=["runInteraction"])
|
||||
self.mock_txn = Mock()
|
||||
self.mock_conn = Mock(spec_set=["cursor"])
|
||||
self.mock_conn = Mock(spec_set=["cursor", "rollback", "commit"])
|
||||
self.mock_conn.cursor.return_value = self.mock_txn
|
||||
self.mock_conn.rollback.return_value = None
|
||||
# Our fake runInteraction just runs synchronously inline
|
||||
|
||||
def runInteraction(func, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue