Commit c0dfd89e authored by Julien Cristau's avatar Julien Cristau
Browse files

Port tests to cubicweb 3.19 API

parent 6874a56c1e3c
......@@ -19,7 +19,7 @@ classifiers = [
'Programming Language :: JavaScript',
]
__depends__ = {'cubicweb': '>= 3.16.0'}
__depends__ = {'cubicweb': '>= 3.19.0'}
__recommends__ = {'cubicweb-addressbook': None}
......
......@@ -11,7 +11,7 @@ XS-Python-Version: >= 2.6
Package: cubicweb-person
Architecture: all
Depends:
cubicweb-common (>= 3.16.0),
cubicweb-common (>= 3.19.0),
${python:Depends},
${misc:Depends},
Recommends: cubicweb-addressbook
......
......@@ -3,12 +3,15 @@ from cubicweb.devtools.testlib import CubicWebTC
class PersonTC(CubicWebTC):
def setup_database(self):
self.request().create_entity('Person', firstname=u'adrien', surname=u'di mascio')
with self.admin_access.repo_cnx() as cnx:
cnx.create_entity('Person', firstname=u'adrien', surname=u'di mascio')
cnx.commit()
def test_dc_title(self):
e = self.execute('Any X WHERE X is Person').get_entity(0, 0)
self.assertEqual(e.dc_title(), 'adrien di mascio')
self.assertEqual(e.dc_long_title(), 'Mr adrien di mascio')
with self.admin_access.client_cnx() as cnx:
e = cnx.execute('Any X WHERE X is Person').get_entity(0, 0)
self.assertEqual(e.dc_title(), 'adrien di mascio')
self.assertEqual(e.dc_long_title(), 'Mr adrien di mascio')
if __name__ == '__main__':
unittest_main()
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