[PATCH 3 of 8 cwclientlib] [py3] Make ViewController.publish() return bytes

Philippe Pepiot philippe.pepiot at logilab.fr
Tue Jun 12 08:36:02 CEST 2018


# HG changeset patch
# User Philippe Pepiot <philippe.pepiot at logilab.fr>
# Date 1528784943 -7200
#      Tue Jun 12 08:29:03 2018 +0200
# Node ID 7ec14a7f9dde21a5c4441349f1f0bfc0954fe056
# Parent  a9c86f8e6a3684a1d5e296737c94fbe95800da47
# Available At https://hg.logilab.org/review/cwclientlib
#              hg pull https://hg.logilab.org/review/cwclientlib -r 7ec14a7f9dde
[py3] Make ViewController.publish() return bytes

As it should be, since response handler expect bytes.

diff --git a/cwclientlib/test/data/views.py b/cwclientlib/test/data/views.py
--- a/cwclientlib/test/data/views.py
+++ b/cwclientlib/test/data/views.py
@@ -7,4 +7,4 @@ class TestController(ViewController):
     __regid__ = 'test-controller'
 
     def publish(self, rset=None):
-        return "coucou"
+        return b"coucou"


More information about the cubicweb-devel mailing list