Commit 1dfb609b authored by sylvain.thenault@logilab.fr's avatar sylvain.thenault@logilab.fr
Browse files

update test for new test schema

--HG--
branch : tls-sprint
parent c23169f79a3b
...@@ -16,7 +16,7 @@ class Note(EntityType): ...@@ -16,7 +16,7 @@ class Note(EntityType):
class SubNote(Note): class SubNote(Note):
__specializes_schema__ = True __specializes_schema__ = True
descr = String() description = String()
class tags(RelationDefinition): class tags(RelationDefinition):
subject = 'Tag' subject = 'Tag'
......
...@@ -68,7 +68,8 @@ class CubicWebConfigurationTC(TestCase): ...@@ -68,7 +68,8 @@ class CubicWebConfigurationTC(TestCase):
self.assertEquals([unabsolutize(p) for p in self.config.vregistry_path()], self.assertEquals([unabsolutize(p) for p in self.config.vregistry_path()],
['entities', 'web/views', 'sobjects', ['entities', 'web/views', 'sobjects',
'file/entities.py', 'file/views', 'file/hooks.py', 'file/entities.py', 'file/views', 'file/hooks.py',
'email/entities.py', 'email/views', 'email/hooks.py']) 'email/entities.py', 'email/views', 'email/hooks.py',
'test/data/entities.py'])
if __name__ == '__main__': if __name__ == '__main__':
unittest_main() unittest_main()
...@@ -144,10 +144,10 @@ class SQLSchemaReaderClassTest(TestCase): ...@@ -144,10 +144,10 @@ class SQLSchemaReaderClassTest(TestCase):
'ECache', 'EConstraint', 'EConstraintType', 'EEType', 'ECache', 'EConstraint', 'EConstraintType', 'EEType',
'EFRDef', 'EGroup', 'EmailAddress', 'ENFRDef', 'EFRDef', 'EGroup', 'EmailAddress', 'ENFRDef',
'EPermission', 'EProperty', 'ERType', 'EUser', 'EPermission', 'EProperty', 'ERType', 'EUser',
'Float', 'Int', 'Interval', 'File', 'Float', 'Image', 'Int', 'Interval', 'Note',
'Password', 'Password', 'Personne',
'RQLExpression', 'RQLExpression',
'State', 'String', 'Time', 'Societe', 'State', 'String', 'SubNote', 'Tag', 'Time',
'Transition', 'TrInfo'] 'Transition', 'TrInfo']
self.assertListEquals(entities, sorted(expected_entities)) self.assertListEquals(entities, sorted(expected_entities))
relations = [str(r) for r in schema.relations()] relations = [str(r) for r in schema.relations()]
...@@ -156,13 +156,13 @@ class SQLSchemaReaderClassTest(TestCase): ...@@ -156,13 +156,13 @@ class SQLSchemaReaderClassTest(TestCase):
'allowed_transition', 'bookmarked_by', 'canonical', 'allowed_transition', 'bookmarked_by', 'canonical',
'cardinality', 'comment', 'comment_format', 'cardinality', 'comment', 'comment_format',
'composite', 'condition', 'constrained_by', 'content', 'composite', 'condition', 'connait', 'constrained_by', 'content',
'content_format', 'created_by', 'creation_date', 'cstrtype', 'content_format', 'created_by', 'creation_date', 'cstrtype',
'defaultval', 'delete_permission', 'description', 'data', 'data_encoding', 'data_format', 'defaultval', 'delete_permission',
'description_format', 'destination_state', 'description', 'description_format', 'destination_state',
'eid', 'expression', 'exprtype', 'ecrit_par', 'eid', 'evaluee', 'expression', 'exprtype',
'final', 'firstname', 'for_user', 'final', 'firstname', 'for_user',
'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed', 'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
...@@ -175,17 +175,17 @@ class SQLSchemaReaderClassTest(TestCase): ...@@ -175,17 +175,17 @@ class SQLSchemaReaderClassTest(TestCase):
'mainvars', 'meta', 'modification_date', 'mainvars', 'meta', 'modification_date',
'name', 'name', 'nom',
'ordernum', 'owned_by', 'ordernum', 'owned_by',
'path', 'pkey', 'primary_email', 'path', 'pkey', 'prenom', 'primary_email',
'read_permission', 'relation_type', 'require_group', 'read_permission', 'relation_type', 'require_group',
'specializes', 'state_of', 'surname', 'symetric', 'synopsis', 'specializes', 'state_of', 'surname', 'symetric', 'synopsis',
'timestamp', 'title', 'to_entity', 'to_state', 'transition_of', 'tags', 'timestamp', 'title', 'to_entity', 'to_state', 'transition_of', 'travaille', 'type',
'upassword', 'update_permission', 'use_email', 'upassword', 'update_permission', 'use_email',
...@@ -198,7 +198,7 @@ class SQLSchemaReaderClassTest(TestCase): ...@@ -198,7 +198,7 @@ class SQLSchemaReaderClassTest(TestCase):
eschema = schema.eschema('EUser') eschema = schema.eschema('EUser')
rels = sorted(str(r) for r in eschema.subject_relations()) rels = sorted(str(r) for r in eschema.subject_relations())
self.assertListEquals(rels, ['created_by', 'creation_date', 'eid', self.assertListEquals(rels, ['created_by', 'creation_date', 'eid',
'firstname', 'has_text', 'identity', 'evaluee', 'firstname', 'has_text', 'identity',
'in_group', 'in_state', 'is', 'in_group', 'in_state', 'is',
'is_instance_of', 'last_login_time', 'is_instance_of', 'last_login_time',
'login', 'modification_date', 'owned_by', 'login', 'modification_date', 'owned_by',
......
...@@ -40,7 +40,6 @@ class VRegistryTC(TestCase): ...@@ -40,7 +40,6 @@ class VRegistryTC(TestCase):
__selectors__ = (myselector1, myselector2) __selectors__ = (myselector1, myselector2)
AnAppObject.build___select__() AnAppObject.build___select__()
self.assertEquals(AnAppObject.__select__(AnAppObject), 2) self.assertEquals(AnAppObject.__select__(AnAppObject), 2)
self.assertEquals(AnAppObject.__select__(), 2)
def test_properties(self): def test_properties(self):
self.failIf('system.version.cubicweb' in self.vreg['propertydefs']) self.failIf('system.version.cubicweb' in self.vreg['propertydefs'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment