[PATCH 3 of 4 compound] [test] Set proper selector on agent clone adapters

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 1 10:56:54 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 fe2aeaad1cae3c191d478f77a7e6b359d5ef76cf
# Parent  eddc207dda229ac1323f7885b4b1b57b93fcc988
[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