Make all tests pass on latest version of dependencies
authorLaurent Wouters <lwouters@cenotelie.fr>
Wed, 29 Apr 2020 15:00:44 +0200
changeset 14 b7ea973e38d8
parent 13 112639729734
child 15 cba52ce2eb91
Make all tests pass on latest version of dependencies
cubicweb_graphql/__pkginfo__.py
cubicweb_graphql/querier.py
test/test_graphql.py
--- a/cubicweb_graphql/__pkginfo__.py	Wed Apr 29 12:02:46 2020 +0200
+++ b/cubicweb_graphql/__pkginfo__.py	Wed Apr 29 15:00:44 2020 +0200
@@ -15,10 +15,10 @@
 web = 'http://www.cubicweb.org/project/%s' % distname
 
 __depends__ = {
-    'cubicweb': '>= 3.26.4',
+    'cubicweb': '>= 3.26.7, < 3.27.0',
     'six': '>= 1.4.0',
-    'graphql-core': '>= 2.0',
-    'graphene': '>= 2.0',
+    'graphql-core': '>= 2.3, <3',
+    'graphene': '>= 2.1, <3',
     'iso8601': None
 }
 __recommends__ = {}
--- a/cubicweb_graphql/querier.py	Wed Apr 29 12:02:46 2020 +0200
+++ b/cubicweb_graphql/querier.py	Wed Apr 29 15:00:44 2020 +0200
@@ -74,7 +74,7 @@
         :param kwargs: The mapping of values for the named variables in the query
         :return: The GraphQL execution result
         """
-        return self._query_schema.execute(query, context={CONNECTION: connection}, values=kwargs)
+        return self._query_schema.execute(query, context={CONNECTION: connection}, variables=kwargs)
 
 
 def default_format_error(error):
--- a/test/test_graphql.py	Wed Apr 29 12:02:46 2020 +0200
+++ b/test/test_graphql.py	Wed Apr 29 15:00:44 2020 +0200
@@ -105,8 +105,8 @@
                 self.assertEquals(len(result.data["Affaire"]), 1)
             with self.new_access(u'anon').repo_cnx() as cnx:
                 # Reading is not OK for anonymous
-                result = self.gql_nok(cnx, query, sujet="cool")
-                self.assertIsNone(result.data["Affaire"])
+                result = self.gql_ok(cnx, query, sujet="cool")
+                self.assertEquals(len(result.data["Affaire"]), 0)
 
     def test_upassword_not_selectable(self):
         query = "{ CWUser { login, upassword } }"