[apycotlib] the get_configuration view now returns only the configuration of the given entity draft
authorDavid Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 14:47:40 +0100
changeset 1747 7a6574304c4c
parent 1746 4d9ae2462503
child 1748 e5bee2960261
[apycotlib] the get_configuration view now returns only the configuration of the given entity for TestConfig or ProjectEnvironment
_apycotlib/atest.py
--- a/_apycotlib/atest.py	Thu Nov 13 14:43:37 2014 +0100
+++ b/_apycotlib/atest.py	Thu Nov 13 14:47:40 2014 +0100
@@ -104,11 +104,13 @@
         try:
             return self._configs_cache[pe_eid]
         except KeyError:
-            config = self.writer.cnxh.rql('Any E WHERE E eid %s' % self.tconfig['eid'],
-                                          vid='apycot.get_configuration',
-                                          environment=pe_eid).json()[0]
-            self._configs_cache[pe_eid] = config
-            return config
+            env = self.writer.cnxh.rql('Any E WHERE E eid %s' % self.tconfig['eid'],
+                                          vid='apycot.get_configuration').json()[0]
+            pe_env = self.writer.cnxh.rql('Any E WHERE E eid %s' % pe_eid,
+                                          vid='apycot.get_configuration').json()[0]
+            env.update(pe_env)
+            self._configs_cache[pe_eid] = env
+            return env
 
     def exec_recipe(self, recipe, working_directory=None, **kwargs):
         cwd = os.getcwd()