[PATCH 2 of 2 Relationwidget cube] Fix yams._exceptions.ValidationError: incorrect value for type 'String'

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 10:08:51 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585728480 0
#      Wed Apr 01 08:08:00 2020 +0000
# Node ID 1bbd12f9458cd830102a10c5f8108aeeb6876ae9
# Parent  9f26b8453a4a68bf4e2c0664a5545f28537bb1ca
Fix yams._exceptions.ValidationError:  incorrect value for type 'String'

diff --git a/test/unittest_views.py b/test/unittest_views.py
--- a/test/unittest_views.py
+++ b/test/unittest_views.py
@@ -91,7 +91,7 @@
         with self.admin_access.web_request() as req:
             self.assertEqual(10, row_nb(self.modal(req), req.user.eid))
         with self.admin_access.client_cnx() as cnx:
-            cnx.user.set_property(u'relationwidget.table-page-size', 3)
+            cnx.user.set_property(u'relationwidget.table-page-size', '3')
             cnx.commit()
         with self.admin_access.web_request() as req:
             self.assertEqual(
@@ -108,7 +108,7 @@
         with self.admin_access.web_request() as req:
             self.assertFalse(has_total(self.modal(req)))
         with self.admin_access.client_cnx() as cnx:
-            cnx.user.set_property(u'relationwidget.display-all-limit', 5)
+            cnx.user.set_property(u'relationwidget.display-all-limit', '5')
             cnx.commit()
         with self.admin_access.web_request() as req:
             self.assertEqual(




More information about the cubicweb-devel mailing list