# HG changeset patch # User Julien Cristau # Date 1445257592 -7200 # Node ID a13db41851290fb9b403f3135d0a786afbd5fc41 # Parent ab626726a70abf24e1a8de3ec90a81c46e7298b5 [server/test] dict.iterkeys diff -r ab626726a70a -r a13db4185129 server/test/unittest_migractions.py --- a/server/test/unittest_migractions.py Tue Nov 03 18:10:58 2015 +0100 +++ b/server/test/unittest_migractions.py Mon Oct 19 14:26:32 2015 +0200 @@ -580,7 +580,7 @@ def test_add_drop_cube_and_deps(self): with self.mh() as (cnx, mh): schema = self.repo.schema - self.assertEqual(sorted((str(s), str(o)) for s, o in schema['see_also'].rdefs.iterkeys()), + self.assertEqual(sorted((str(s), str(o)) for s, o in schema['see_also'].rdefs), sorted([('EmailThread', 'EmailThread'), ('Folder', 'Folder'), ('Bookmark', 'Bookmark'), ('Bookmark', 'Note'), ('Note', 'Note'), ('Note', 'Bookmark')])) @@ -594,7 +594,7 @@ for ertype in ('Email', 'EmailThread', 'EmailPart', 'File', 'sender', 'in_thread', 'reply_to', 'data_format'): self.assertNotIn(ertype, schema) - self.assertEqual(sorted(schema['see_also'].rdefs.iterkeys()), + self.assertEqual(sorted(schema['see_also'].rdefs), sorted([('Folder', 'Folder'), ('Bookmark', 'Bookmark'), ('Bookmark', 'Note'), @@ -613,12 +613,12 @@ for ertype in ('Email', 'EmailThread', 'EmailPart', 'File', 'sender', 'in_thread', 'reply_to', 'data_format'): self.assertIn(ertype, schema) - self.assertEqual(sorted(schema['see_also'].rdefs.iterkeys()), - sorted([('EmailThread', 'EmailThread'), ('Folder', 'Folder'), - ('Bookmark', 'Bookmark'), - ('Bookmark', 'Note'), - ('Note', 'Note'), - ('Note', 'Bookmark')])) + self.assertEqual(sorted(schema['see_also'].rdefs), + sorted([('EmailThread', 'EmailThread'), ('Folder', 'Folder'), + ('Bookmark', 'Bookmark'), + ('Bookmark', 'Note'), + ('Note', 'Note'), + ('Note', 'Bookmark')])) self.assertEqual(sorted(schema['see_also'].subjects()), ['Bookmark', 'EmailThread', 'Folder', 'Note']) self.assertEqual(sorted(schema['see_also'].objects()), ['Bookmark', 'EmailThread', 'Folder', 'Note']) from cubes.fakeemail.__pkginfo__ import version as email_version