Commit 6f5fb314 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[user] Drop ugly hack on CWUser entity class

which should be not necessary anymore, beside two remaining usage in our own
test suite.
parent e9682629df57
......@@ -173,14 +173,3 @@ class CWUser(AnyEntity):
return self.login
dc_long_title = name
def __call__(self, *args, **kwargs):
"""ugly hack for compatibility betweeb dbapi and repo api
In the dbapi, Connection and Session have a ``user`` method to
generated a user for a request In the repo api, Connection and Session
have a user attribute inherited from SessionRequestBase prototype. This
ugly hack allows to not break user of the user method.
XXX Deprecate me ASAP"""
return self
......@@ -1146,7 +1146,7 @@ Any P1,B,E WHERE P1 identity P2 WITH
self.assertRaises(QueryError,
self.qexecute,
"INSERT CWUser X: X login 'toto', X eid %s" % cnx.user(self.session).eid)
"INSERT CWUser X: X login 'toto', X eid %s" % cnx.user.eid)
def test_insertion_description_with_where(self):
rset = self.qexecute('INSERT CWUser E, EmailAddress EM: E login "X", E upassword "X", '
......@@ -1338,7 +1338,7 @@ Any P1,B,E WHERE P1 identity P2 WITH
"WHERE X is Personne")
self.assertRaises(QueryError,
self.qexecute,
"SET X login 'tutu', X eid %s" % cnx.user(self.session).eid)
"SET X login 'tutu', X eid %s" % cnx.user.eid)
# HAVING on write queries test #############################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment