mirror of
https://github.com/yweber/lodel2.git
synced 2025-12-28 03:36:55 +01:00
em_test update + bugfix in tests
This commit is contained in:
parent
0acd3d6612
commit
ece5029d66
4 changed files with 13 additions and 6 deletions
15
em_test.py
15
em_test.py
|
|
@ -153,7 +153,8 @@ text.new_field( 'subtitle',
|
|||
},
|
||||
group = editorial_group,
|
||||
data_handler = 'varchar',
|
||||
nullable = True)
|
||||
nullable = True,
|
||||
default = None)
|
||||
|
||||
# Classe collection
|
||||
collection = em.new_class( 'collection',
|
||||
|
|
@ -205,7 +206,9 @@ section.new_field( 'childs',
|
|||
group = editorial_group,
|
||||
data_handler = 'hierarch',
|
||||
allowed_classes = [subsection],
|
||||
back_reference = ('subsection', 'parent'))
|
||||
back_reference = ('subsection', 'parent'),
|
||||
default = None,
|
||||
nullable = True)
|
||||
|
||||
subsection.new_field( 'parent',
|
||||
display_name = 'Parent',
|
||||
|
|
@ -286,7 +289,9 @@ text.new_field( 'linked_persons',
|
|||
data_handler = 'list',
|
||||
back_reference = ('Person', 'linked_texts'),
|
||||
group = editorial_person_group,
|
||||
allowed_classes = [person])
|
||||
allowed_classes = [person],
|
||||
default = None,
|
||||
nullable = True)
|
||||
|
||||
#####################
|
||||
# Index classes # <--- Note : using a different datasource for testing
|
||||
|
|
@ -327,7 +332,9 @@ text.new_field( 'indexes',
|
|||
'fre': 'Indexes'},
|
||||
data_handler = 'list',
|
||||
back_reference = ('Indexabs', 'texts'),
|
||||
allowed_classes = [index_abstract])
|
||||
allowed_classes = [index_abstract],
|
||||
default = None,
|
||||
nullable = True)
|
||||
|
||||
index_abstract.new_field( 'texts',
|
||||
display_name = {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -6,7 +6,7 @@ class MongoDbMigrationHandlerTestCase(unittest.TestCase):
|
|||
|
||||
def test_check_connection_args(self):
|
||||
empty_connection_args = {}
|
||||
with self.assertRaises(MigrationHandlerError):
|
||||
with self.assertRaises(TypeError):
|
||||
MigrationHandler(empty_connection_args)
|
||||
|
||||
bad_connection_args_dicts = [
|
||||
|
|
@ -15,7 +15,7 @@ class MongoDbMigrationHandlerTestCase(unittest.TestCase):
|
|||
{'host': 'localhost', 'port': 28015, 'login':'lodel', 'password': 'lap'}
|
||||
]
|
||||
for bad_connection_args_dict in bad_connection_args_dicts:
|
||||
with self.assertRaises(MigrationHandlerError):
|
||||
with self.assertRaises(TypeError):
|
||||
MigrationHandler(bad_connection_args_dict)
|
||||
|
||||
## @todo pass the connection arguments in the settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue