Revert to using OrderedDict.

This commit is contained in:
Friedrich Lindenberg
2014-02-18 12:59:12 +01:00
parent a963e4a5ed
commit 6ef4cd7814
3 changed files with 20 additions and 7 deletions
+4 -2
View File
@@ -124,9 +124,11 @@ class DatabaseTestCase(unittest.TestCase):
def test_table_cache_updates(self):
tbl1 = self.db.get_table('people')
tbl1.insert(OrderedDict([('first_name', 'John'), ('last_name', 'Smith')]))
data = OrderedDict([('first_name', 'John'), ('last_name', 'Smith')])
tbl1.insert(data)
data['id'] = 1
tbl2 = self.db.get_table('people')
assert list(tbl2.all()) == [(1, 'John', 'Smith')]
assert dict(tbl2.all().next()) == dict(data), (tbl2.all().next(), data)
class TableTestCase(unittest.TestCase):