Commit 1c8cf830 authored by David Douard's avatar David Douard
Browse files

[test] port test to 3.19 API

And add a commit() during setUp.
parent 67f788249cfe
# -*- coding: utf-8 -*-
# copyright 2013-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2013-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -36,6 +35,7 @@ class RqlIOTc(CubicWebServerTC):
super(RqlIOTc, self).setUp()
with self.admin_access.client_cnx() as cnx:
self.create_user(cnx, u'toto', password=u'toto')
cnx.commit()
def connectedRQLIOSession(self, login='admin', password='gingkow'):
rsession = requests.Session()
......@@ -86,9 +86,10 @@ class RqlIOTc(CubicWebServerTC):
rsession = self.connectedRQLIOSession()
res = self.assertRQLPostOK(rsession, queries)
self.assertEqual('pachyderms',
self.execute('Any N WHERE U in_group G, U login "Babar", '
'G name N').rows[0][0])
with self.admin_access.client_cnx() as cnx:
self.assertEqual('pachyderms',
cnx.execute('String N WHERE U in_group G, U login "Babar", '
'G name N').rows[0][0])
output = [x for x, in res.json()]
self.assertEqual(1, len(output[0]))
self.assertEqual(1, len(output[1]))
......
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