Anonymous avatar Anonymous committed 8b84cc9

[test/schema] fix test likely failing since a8e98dd990fe

Comments (0)

Files changed (1)

test/unittest_schema.py

         ce = self.request().create_entity
         study = ce('Study', uses_executable=(self.exe))
         self.commit()
-        json = (u'{"modules":[{"name":%(exe)s,"value":{"p1":%(f)s, "p2":1.0}}],"wires":[]}'
-                % dict(exe=dumps(self.exe.dc_title()), f=dumps(self.fval.eid)))
+        json = (u'{"modules":[{"eid":%(exe)s,"value":{"p1":%(f)s, "p2":1.0}}],"wires":[]}'
+                % {'exe':self.exe.eid, 'f':dumps(self.fval.eid)})
         ce('Wiring', json=json, reverse_wiring=study, language=study.wlang)
         self.commit()
         # record values before wiring update
         old_run = study.has_runs[0]
-        old_pval = old_run.pvalue('p1')
+        old_pval = old_run.pvalue_entity('p1')
         fval = old_pval.value_file[0]
         # dummy yet sufficient wiring update
         study.wiring[0].set_attributes(json=json+u' ')
         # check everything happened as expected
         study.cw_clear_all_caches()
         self.assertTrue(old_run.eid != study.has_runs[0].eid)
-        self.assertTrue(old_pval.eid != study.has_runs[0].pvalue('p1').eid)
-        self.assertEqual(study.has_runs[0].pvalue('p1').value_file[0].eid,
+        self.assertTrue(old_pval.eid != study.has_runs[0].pvalue_entity('p1').eid)
+        self.assertEqual(study.has_runs[0].pvalue_entity('p1').value_file[0].eid,
                          fval.eid)
         # remove one reference to the file, and check it still exists
         self.run.cw_delete()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.