mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
synapse/storage/_base.py:_simple_selectupdate_one was unused
This commit is contained in:
parent
82b8d4b86a
commit
1ee3d26432
2 changed files with 0 additions and 51 deletions
|
@ -185,26 +185,6 @@ class SQLBaseStoreTestCase(unittest.TestCase):
|
|||
[3, 4, 1, 2]
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_update_one_with_return(self):
|
||||
self.mock_txn.rowcount = 1
|
||||
self.mock_txn.fetchone.return_value = ("Old Value",)
|
||||
|
||||
ret = yield self.datastore._simple_selectupdate_one(
|
||||
table="tablename",
|
||||
keyvalues={"keycol": "TheKey"},
|
||||
updatevalues={"columname": "New Value"},
|
||||
retcols=["columname"]
|
||||
)
|
||||
|
||||
self.assertEquals({"columname": "Old Value"}, ret)
|
||||
self.mock_txn.execute.assert_has_calls([
|
||||
call('SELECT columname FROM tablename WHERE keycol = ?',
|
||||
['TheKey']),
|
||||
call("UPDATE tablename SET columname = ? WHERE keycol = ?",
|
||||
["New Value", "TheKey"])
|
||||
])
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_delete_one(self):
|
||||
self.mock_txn.rowcount = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue