--- a/test/unittest_repoapi.py Fri Jun 13 15:42:04 2014 +0200
+++ b/test/unittest_repoapi.py Fri Jun 13 15:56:08 2014 +0200
@@ -26,7 +26,7 @@
class REPOAPITC(CubicWebTC):
- def test_clt_cnx_basic_usage(self):
+ def test_cnx_basic_usage(self):
"""Test that a client connection can be used to access the database"""
with self.admin_access.client_cnx() as cltcnx:
# (1) some RQL request
@@ -52,7 +52,7 @@
''')
self.assertTrue(rset)
- def test_clt_cnx_life_cycle(self):
+ def test_cnx_life_cycle(self):
"""Check that ClientConnection requires explicit open and close
"""
access = self.admin_access
@@ -69,18 +69,18 @@
def test_connect(self):
"""check that repoapi.connect works and returns a usable connection"""
- clt_cnx = connect(self.repo, login='admin', password='gingkow')
- self.assertEqual('admin', clt_cnx.user.login)
- with clt_cnx:
- rset = clt_cnx.execute('Any X WHERE X is CWUser')
+ cnx = connect(self.repo, login='admin', password='gingkow')
+ self.assertEqual('admin', cnx.user.login)
+ with cnx:
+ rset = cnx.execute('Any X WHERE X is CWUser')
self.assertTrue(rset)
def test_anonymous_connect(self):
"""check that you can get anonymous connection when the data exist"""
- clt_cnx = anonymous_cnx(self.repo)
- self.assertEqual('anon', clt_cnx.user.login)
- with clt_cnx:
- rset = clt_cnx.execute('Any X WHERE X is CWUser')
+ cnx = anonymous_cnx(self.repo)
+ self.assertEqual('anon', cnx.user.login)
+ with cnx:
+ rset = cnx.execute('Any X WHERE X is CWUser')
self.assertTrue(rset)