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

[test] Import module instead of names

will be easier to use another function from this module.
parent a88deb387b2b
......@@ -20,7 +20,7 @@ from itertools import chain, repeat
from cubicweb import ValidationError
from cubicweb.devtools.testlib import CubicWebTC
from testutils import create_transfer_to_bdo, create_archive_unit, scheme_for_type
import testutils
class ValidationHooksTC(CubicWebTC):
......@@ -35,7 +35,7 @@ class ValidationHooksTC(CubicWebTC):
reuse_concept = reuse_scheme.add_concept(label=u'share-alike')
cnx.commit()
bdo = create_transfer_to_bdo(cnx)
bdo = testutils.create_transfer_to_bdo(cnx)
transfer = bdo.container[0]
create('SEDAAccessRuleCodeListVersion',
seda_access_rule_code_list_version_from=transfer,
......@@ -140,7 +140,7 @@ class SetDefaultHooksTC(CubicWebTC):
('seda_rule', 'SEDASeqAppraisalRuleRule'),
('seda_rule', 'SEDASeqAccessRuleRule'),
('seda_rule', 'SEDASeqDisseminationRuleRule')]):
scheme_for_type(cnx, rtype, etype)
testutils.scheme_for_type(cnx, rtype, etype)
cnx.commit()
transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'test profile')
cnx.commit()
......@@ -160,7 +160,7 @@ class SetDefaultHooksTC(CubicWebTC):
"""
with self.admin_access.client_cnx() as cnx:
transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'test profile')
unit, unit_alt, unit_alt_seq = create_archive_unit(transfer)
unit, unit_alt, unit_alt_seq = testutils.create_archive_unit(transfer)
version_of = cnx.create_entity('SEDAIsVersionOf', seda_is_version_of=unit_alt_seq)
alt2 = cnx.create_entity('SEDAAltIsVersionOfArchiveUnitRefId',
reverse_seda_alt_is_version_of_archive_unit_ref_id=version_of)
......@@ -175,7 +175,7 @@ class CheckProfileTC(CubicWebTC):
def test_base(self):
with self.admin_access.repo_cnx() as cnx:
transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'diagnosis testing')
unit, unit_alt, unit_alt_seq = create_archive_unit(transfer)
unit, unit_alt, unit_alt_seq = testutils.create_archive_unit(transfer)
access_rule = cnx.create_entity('SEDAAccessRule', seda_access_rule=unit_alt_seq)
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