summary refs log tree commit diff
path: root/tests/storage/test_base.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-12-02 13:50:05 +0000
committerDavid Baker <dbkr@matrix.org>2014-12-02 13:50:05 +0000
commit7642d95d5e90bab130b33dc27f10e347072e0294 (patch)
tree08c618bc5daeceb90bb8a47e3800b88c12d83427 /tests/storage/test_base.py
parentMore work on pushers. Attempt to do HTTP pokes. Not sure if the actual HTTP p... (diff)
parentAdd non-working jitsi meet bridge (diff)
downloadsynapse-7642d95d5e90bab130b33dc27f10e347072e0294.tar.xz
Merge branch 'develop' into pushers
Diffstat (limited to 'tests/storage/test_base.py')
-rw-r--r--tests/storage/test_base.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py
index fabd364be9..a6f1d6a333 100644
--- a/tests/storage/test_base.py
+++ b/tests/storage/test_base.py
@@ -84,7 +84,8 @@ class SQLBaseStoreTestCase(unittest.TestCase):
 
         self.assertEquals("Value", value)
         self.mock_txn.execute.assert_called_with(
-                "SELECT retcol FROM tablename WHERE keycol = ?",
+                "SELECT retcol FROM tablename WHERE keycol = ? "
+                "ORDER BY rowid asc",
                 ["TheKey"]
         )
 
@@ -101,7 +102,8 @@ class SQLBaseStoreTestCase(unittest.TestCase):
 
         self.assertEquals({"colA": 1, "colB": 2, "colC": 3}, ret)
         self.mock_txn.execute.assert_called_with(
-                "SELECT colA, colB, colC FROM tablename WHERE keycol = ?",
+                "SELECT colA, colB, colC FROM tablename WHERE keycol = ? "
+                "ORDER BY rowid asc",
                 ["TheKey"]
         )
 
@@ -135,7 +137,8 @@ class SQLBaseStoreTestCase(unittest.TestCase):
 
         self.assertEquals([{"colA": 1}, {"colA": 2}, {"colA": 3}], ret)
         self.mock_txn.execute.assert_called_with(
-                "SELECT colA FROM tablename WHERE keycol = ?",
+                "SELECT colA FROM tablename WHERE keycol = ? "
+                "ORDER BY rowid asc",
                 ["A set"]
         )
 
@@ -184,7 +187,8 @@ class SQLBaseStoreTestCase(unittest.TestCase):
 
         self.assertEquals({"columname": "Old Value"}, ret)
         self.mock_txn.execute.assert_has_calls([
-                call('SELECT columname FROM tablename WHERE keycol = ?',
+                call('SELECT columname FROM tablename WHERE keycol = ? '
+                     'ORDER BY rowid asc',
                     ['TheKey']),
                 call("UPDATE tablename SET columname = ? WHERE keycol = ?",
                     ["New Value", "TheKey"])