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

Denis Laxalde denis.laxalde at logilab.fr
Tue Apr 18 09:45:13 CEST 2017


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?

>              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)
>



More information about the saem-devel mailing list