--- a/test/unittest_schema.py Fri Oct 08 07:55:11 2010 +0200
+++ b/test/unittest_schema.py Fri Oct 08 11:11:08 2010 +0200
@@ -167,8 +167,7 @@
schema = loader.load(config)
self.assert_(isinstance(schema, CubicWebSchema))
self.assertEqual(schema.name, 'data')
- entities = [str(e) for e in schema.entities()]
- entities.sort()
+ entities = sorted([str(e) for e in schema.entities()])
expected_entities = ['BaseTransition', 'Bookmark', 'Boolean', 'Bytes', 'Card',
'Date', 'Datetime', 'Decimal',
'CWCache', 'CWConstraint', 'CWConstraintType', 'CWEType',
@@ -182,8 +181,7 @@
'Tag', 'Time', 'Transition', 'TrInfo',
'Workflow', 'WorkflowTransition']
self.assertListEqual(entities, sorted(expected_entities))
- relations = [str(r) for r in schema.relations()]
- relations.sort()
+ relations = sorted([str(r) for r in schema.relations()])
expected_relations = ['add_permission', 'address', 'alias', 'allowed_transition',
'bookmarked_by', 'by_transition',
@@ -308,7 +306,7 @@
def test_comparison(self):
self.assertEqual(ERQLExpression('X is CWUser', 'X', 0),
ERQLExpression('X is CWUser', 'X', 0))
- self.assertNotEquals(ERQLExpression('X is CWUser', 'X', 0),
+ self.assertNotEqual(ERQLExpression('X is CWUser', 'X', 0),
ERQLExpression('X is CWGroup', 'X', 0))
class GuessRrqlExprMainVarsTC(TestCase):