[PATCH 8 of 8 compound V2] [test] Set proper selector on agent clone adapters

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 3 09:49:07 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488362017 -3600
#      Wed Mar 01 10:53:37 2017 +0100
# Node ID ebbaa80e47c5b35bb711f9f2c2550183a7610afb
# Parent  c920d5cf4dfc22df07c573bf37a7c71951edeffd
[test] Set proper selector on agent clone adapters

diff --git a/test/data/entities.py b/test/data/entities.py
--- a/test/data/entities.py
+++ b/test/data/entities.py
@@ -8,18 +8,19 @@ from cubes.compound.views import CloneAc
 def agent_structure_def(schema):
     return structure_def(schema, 'Agent').items()
 
 
 class AgentIClonableAdapter(IClonableAdapter):
+    __select__ = is_instance('Agent')
     rtype = 'clone_of'
 
 
 class AgentInGroupIClonableAdapter(IClonableAdapter):
     """IClonable for Agent member of a Group, following `member` relation for
     cloning.
     """
-    __select__ = (IClonableAdapter.__select__
+    __select__ = (is_instance('Agent')
                   & has_related_entities('member', role='object'))
     rtype = 'clone_of'
     follow_relations = [('member', 'object')]
 
 


More information about the saem-devel mailing list