Commit 58ec3221 authored by Jérome Perrin's avatar Jérome Perrin

more fixes to ingestion from user login revert

parent 9a5a0788
...@@ -59,6 +59,7 @@ assignment_dict = context.ERP5Site_getPersonAssignmentDict(user_name=user_name)\ ...@@ -59,6 +59,7 @@ assignment_dict = context.ERP5Site_getPersonAssignmentDict(user_name=user_name)\
\n \n
# XXX: make list of properties configurable through preferences\n # XXX: make list of properties configurable through preferences\n
return {\'group_list\': assignment_dict[\'group_list\'],\n return {\'group_list\': assignment_dict[\'group_list\'],\n
\'site_list\': assignment_dict[\'site_list\'],\n
\'function_list\': assignment_dict[\'function_list\']}\n \'function_list\': assignment_dict[\'function_list\']}\n
</string> </value> </string> </value>
</item> </item>
......
150 151
\ No newline at end of file \ No newline at end of file
...@@ -1457,16 +1457,16 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -1457,16 +1457,16 @@ class TestIngestion(ERP5TypeTestCase):
user = self.createUser(reference='contributor1') user = self.createUser(reference='contributor1')
assignment = self.createUserAssignment(user, \ assignment = self.createUserAssignment(user, \
dict(group='anybody', dict(group='anybody',
function='function/musician/wind/saxophone', function='musician/wind/saxophone',
site='site/arctic/spitsbergen')) site='arctic/spitsbergen'))
portal.document_module.manage_setLocalRoles('contributor1', ['Assignor',]) portal.document_module.manage_setLocalRoles('contributor1', ['Assignor',])
self.tic() self.tic()
file_object = makeFileUpload('TEST-en-002.doc') file_object = makeFileUpload('TEST-en-002.doc')
document = contribution_tool.newContent(file=file_object) document = contribution_tool.newContent(file=file_object)
document.discoverMetadata(document.getSourceReference(), 'contributor1') document.discoverMetadata(document.getFilename(), 'contributor1')
self.tic() self.tic()
self.assertEquals(document.getSourceReference(), 'TEST-en-002.doc') self.assertEquals(document.getFilename(), 'TEST-en-002.doc')
self.assertEquals('function/musician/wind/saxophone', document.getFunction()) self.assertEquals('musician/wind/saxophone', document.getFunction())
self.assertEquals('anybody', document.getGroup()) self.assertEquals('anybody', document.getGroup())
self.assertEquals('arctic/spitsbergen', document.getSite()) self.assertEquals('arctic/spitsbergen', document.getSite())
......
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