cubicweb/test/unittest_repoapi.py
changeset 12043 b8d2e6b9f548
parent 11824 d7ecf6dab085
equal deleted inserted replaced
12042:5e64a98572de 12043:b8d2e6b9f548
    54 
    54 
    55     def test_cnx_life_cycle(self):
    55     def test_cnx_life_cycle(self):
    56         """Check that ClientConnection requires explicit open and close
    56         """Check that ClientConnection requires explicit open and close
    57         """
    57         """
    58         access = self.admin_access
    58         access = self.admin_access
    59         cltcnx = Connection(access._session)
    59         cltcnx = Connection(access._repo, access._user)
    60         # connection not open yet
    60         # connection not open yet
    61         with self.assertRaises(ProgrammingError):
    61         with self.assertRaises(ProgrammingError):
    62             cltcnx.execute('Any X WHERE X is CWUser')
    62             cltcnx.execute('Any X WHERE X is CWUser')
    63         # connection open and working
    63         # connection open and working
    64         with cltcnx:
    64         with cltcnx: