Commit c85d5a1a authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[test] Use create shortcut when it's defined

parent 60c4c97e1b73
......@@ -715,7 +715,7 @@ class OldSEDAExportMixin(object):
reverse_seda_end_date=create('SEDAEndDate'),
# XXX, value=date(2015, 2, 24)),
reverse_seda_description=create('SEDADescription'))
cnx.create_entity('SEDATitle', seda_title=content)
create('SEDATitle', seda_title=content)
kw = create('SEDAKeyword',
user_cardinality=u'0..n',
......@@ -732,14 +732,14 @@ class OldSEDAExportMixin(object):
create('SEDAOriginatingAgency', seda_originating_agency_from=content,
seda_originating_agency_to=agent)
cnx.create_entity('SEDAType', seda_type_from=content,
seda_type_to=concepts['CDO'])
create('SEDAType', seda_type_from=content,
seda_type_to=concepts['CDO'])
# Add sub archive unit
_, _, subunit_alt_seq = create_archive_unit(unit_alt_seq, id=u'au2',
user_cardinality=u'1..n')
content = create('SEDAContent', seda_content=subunit_alt_seq)
cnx.create_entity('SEDATitle', seda_title=content)
create('SEDATitle', seda_title=content)
create('SEDAAppraisalRule',
seda_appraisal_rule=subunit_alt_seq,
......@@ -773,7 +773,7 @@ class OldSEDAExportMixin(object):
_, _, subunit2_alt_seq = create_archive_unit(unit_alt_seq, id=u'au3',
user_cardinality=u'1..n')
content = create('SEDAContent', seda_content=subunit2_alt_seq)
cnx.create_entity('SEDATitle', seda_title=content)
create('SEDATitle', seda_title=content)
cnx.commit()
......
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