devtools/fake.py
changeset 5768 1e73a466aa69
parent 5467 57372dbfd114
child 6427 c8a5ac2d1eaa
equal deleted inserted replaced
5766:c397819f2482 5768:1e73a466aa69
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """Fake objects to ease testing of cubicweb without a fully working environment
    18 """Fake objects to ease testing of cubicweb without a fully working environment
    19 
       
    20 """
    19 """
       
    20 
    21 __docformat__ = "restructuredtext en"
    21 __docformat__ = "restructuredtext en"
    22 
    22 
    23 from logilab.database import get_db_helper
    23 from logilab.database import get_db_helper
    24 
    24 
    25 from cubicweb.req import RequestSessionBase
    25 from cubicweb.req import RequestSessionBase
    44 
    44 
    45     def cubes(self, expand=False):
    45     def cubes(self, expand=False):
    46         return self._cubes
    46         return self._cubes
    47 
    47 
    48     def sources(self):
    48     def sources(self):
    49         return {}
    49         return {'system': {'db-driver': 'sqlite'}}
    50 
    50 
    51 
    51 
    52 class FakeRequest(CubicWebRequestBase):
    52 class FakeRequest(CubicWebRequestBase):
    53     """test implementation of an cubicweb request object"""
    53     """test implementation of an cubicweb request object"""
    54 
    54