--- a/test/unittest_schema.py Wed Sep 14 09:10:58 2011 +0200
+++ b/test/unittest_schema.py Wed Sep 14 09:11:50 2011 +0200
@@ -106,9 +106,9 @@
# isinstance(cstr, RQLConstraint)
# -> expected to return RQLConstraint instances but not
# RRQLVocabularyConstraint and QLUniqueConstraint
- self.failIf(issubclass(RQLUniqueConstraint, RQLVocabularyConstraint))
- self.failIf(issubclass(RQLUniqueConstraint, RQLConstraint))
- self.failUnless(issubclass(RQLConstraint, RQLVocabularyConstraint))
+ self.assertFalse(issubclass(RQLUniqueConstraint, RQLVocabularyConstraint))
+ self.assertFalse(issubclass(RQLUniqueConstraint, RQLConstraint))
+ self.assertTrue(issubclass(RQLConstraint, RQLVocabularyConstraint))
def test_entity_perms(self):
self.assertEqual(eperson.get_groups('read'), set(('managers', 'users', 'guests')))
@@ -238,15 +238,15 @@
properties = rschema.rdef('CWAttribute', 'CWRType')
self.assertEqual(properties.cardinality, '1*')
constraints = properties.constraints
- self.failUnlessEqual(len(constraints), 1, constraints)
+ self.assertEqual(len(constraints), 1, constraints)
constraint = constraints[0]
- self.failUnless(isinstance(constraint, RQLConstraint))
- self.failUnlessEqual(constraint.expression, 'O final TRUE')
+ self.assertTrue(isinstance(constraint, RQLConstraint))
+ self.assertEqual(constraint.expression, 'O final TRUE')
def test_fulltext_container(self):
schema = loader.load(config)
- self.failUnless('has_text' in schema['CWUser'].subject_relations())
- self.failIf('has_text' in schema['EmailAddress'].subject_relations())
+ self.assertTrue('has_text' in schema['CWUser'].subject_relations())
+ self.assertFalse('has_text' in schema['EmailAddress'].subject_relations())
def test_permission_settings(self):
schema = loader.load(config)