cubicweb #2920299 Rework Test API [resolved]

If we rework the session API we need to rework the way we access the repo in the test. The way it is done now is an issue in itself anyway.

Issue with the current API

The currently the test heavily rely on the fact that in the DBAPI, all request are actually using the very same database transaction

self.request().execute('Insert Elephant B, B name "Babar"')
self.execute('SET B king EK WHERE EK name "Babar"')
req = self.request()
req.execute('Insert Elephant C, C name "Celestine", C spouse B WHERE B name "Babar"')
# tadam !

To be detailled

Proposed solution

The proposed solution is based on the reworked database access API detailled here #2503918.

method on directly accessing on the TestCase will be dropped. We get three method that get database accessors

  • web_request() (will eventually not be a daabase accessors anymore
  • client_cnx()
  • server_cnx()

To be detailled

done in3.19.0
load left0.000
closed by<not specified>
patch[testlib] introduce a RepoAccess class to easily create connection and request [applied]