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