[PATCH 1 of 2 saem] [test] Update setup_profile to return the transfer entity

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Apr 18 10:58:36 CEST 2017



Le 18/04/2017 à 09:45, Denis Laxalde a écrit :
> Sylvain Thenault a écrit :
>> # HG changeset patch
>> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
>> # Date 1492177875 -7200
>> #      Fri Apr 14 15:51:15 2017 +0200
>> # Node ID bcf704ab33970fe1d22e0606d64ca3d4c55419d1
>> # Parent  7e1a8f1c1102f0171f7285356b8437921dd71ebd
>> # Available At http://hg.logilab.org/review/cubes/saem_ref
>> #              hg pull http://hg.logilab.org/review/cubes/saem_ref -r
>> bcf704ab3397
>> [test] Update setup_profile to return the transfer entity
>>
>> instead of its ark. This will ease later test that also need the eid.
>>
>
>> diff --git a/test/unittest_entities_container.py
>> b/test/unittest_entities_container.py
>> --- a/test/unittest_entities_container.py
>> +++ b/test/unittest_entities_container.py
>> @@ -83,13 +83,10 @@ class TreeTC(CubicWebTC):
>>              transfer = testutils.setup_profile(cnx,
>> reverse_use_profile=agent)
>>              unit, unit_alt, unit_alt_seq =
>> testutils.create_archive_unit(transfer)
>>              testutils.create_data_object(transfer)
>>              cnx.commit()
>>
>> -           
>> transfer.cw_adapt_to('IWorkflowable').fire_transition('publish')
>> -            cnx.commit()
>> -
>
> Unrelated?

yep, should be in the next commit. Will send a v2 with that fixed. Thx

>
>>              clone = testutils.setup_profile(cnx, title=u'Clone',
>> new_version_of=transfer)
>>              cnx.commit()
>>
>>              # ark and cwuri should not have been copied
>>              self.assertNotEqual(clone.ark, transfer.ark)
>>
>

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the saem-devel mailing list