Commit f92f62cd authored by Jérome Perrin's avatar Jérome Perrin

Revert "Meta data discovery uses subordination through Career rather than Assignments."

This reverts commit 96bfc618.
parent 36cfe5a9
master allow_login_change allow_login_change_differentiate_id_and_login allow_login_change_wip arnau arnau-kns arnau-kns-without-property-mapping auto_extend_select_list autoflake backup_erp5_workflow bk_erp5ish_actions_tool bk_sqlcatalog bt5_config business_bot catalog_fulltext catalog_fulltext_old cedric cedriclen cedriclen-eos cherry-pick-4a8e045d clean_up_upgrader cleanup_acquisition_base_category compact_title_no_reference credential_update_action datetimefield delivery_item_barcode douglas_forum dream_distributor dsn-phase3 eos-dev erp5-component erp5-data-notebook erp5-forum erp5-preference erp5-release erp5-slapos-upgrade erp5-vifib erp5-vifib-cleanup erp5_calendar erp5_catalog erp5_catalog_final erp5_free_subscription erp5_workflow erp5testnode_max_timeout experiment/coding_style_test_suite feat/accounting_balance_sheet_profit_and_loss_cleanups feat/accounting_stop_using_getObject feat/accounting_translate_gap feat/no_useless_records_in_predicate_table feat/olapy feat/trade_shipment_report feat/wendelin-py-data feature/renderjs-linesfield feature/renderjs-matrixbox feature/renderjs-ui-no-header fix/full_text_script_conflict fix/login_validate_check_consistency fix/repair_graph_editor fix/xvfb_all_displays_locked for_testrunner_1 for_testrunner_2 for_testrunner_3 gabriel gabriel-fix-rounding-in-accounting-generation gabriel-fix-rounding-in-accounting-generation2 gadget-json-value improve_default_caching_policy_manager initsite isDeletable item_tracking_graph_editor jerome-bt-reference-doc jerome-test jerome_events jerome_graph_editor_renderjs jerome_user_preference_time_zone jm/form-action-guard joblib-activity kns kns-kr mame-erp5_project-cleanup mame-work maste_copy master_calendar_wip_patches master_calendar_wip_patches_extend_security master_no_guard_on_workflow_transition master_no_guard_on_workflow_transition_plus_calendar_wip_patchs monitoring mrp nexedi-erp5-jp no_longer_simulated_state officejs officejs_clean officejs_zip portal_callables portal_solver_process_security_configuration rebased_mrp reindex_calendar_after_change_calendar_exception reverse_logistics rewrite_test_21_AcquiredPortalType romain-fulltext scalability-rebase scalability-roque shop-box sms_more_than_140_characters strict_catalog sws_fix taskdistribution-xmlrpc-binary test_page testnode_software_link timezones tmp/getInstalledBusinessTemplate_never_installed_bt tristan tristan-merge tristan-performance view-aggregated-amounts vivekpab_erp5webrenderjs_layoutconfig vivekpab_jabberclient vivekpab_renderjs_interfaces wenjie wenjie_branch erp5.util-0.4.49 erp5.util-0.4.46 erp5.util-0.4.44 erp5.util-0.4.43 erp5.util-0.4.41 erp5.util-0.4.40 erp5.util-0.4.37
No related merge requests found
......@@ -1455,17 +1455,18 @@ class TestIngestion(ERP5TypeTestCase):
contribution_tool = getToolByName(portal, 'portal_contributions')
# create an user to simulate upload from him
user = self.createUser(reference='contributor1')
organisation = self.portal.organisation_module.newContent(**dict(group='anybody',
site='arctic/spitsbergen'))
user.setSubordinationValue(organisation)
assignment = self.createUserAssignment(user, \
dict(group='anybody',
function='function/musician/wind/saxophone',
site='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.getFilename(), 'contributor1')
self.tic()
self.assertEquals(document.getFilename(), 'TEST-en-002.doc')
document.discoverMetadata(document.getSourceReference(), 'contributor1')
self.stepTic()
self.assertEquals(document.getSourceReference(), 'TEST-en-002.doc')
self.assertEquals('function/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