summaryrefslogtreecommitdiff
path: root/src/mailman/rest/docs/helpers.rst
diff options
context:
space:
mode:
authorBarry Warsaw2014-11-30 21:51:03 -0500
committerBarry Warsaw2014-11-30 21:51:03 -0500
commit44e43727be13e3554342c2b5b75b7dc42abdb18c (patch)
treea0b97771f5d0856709ac8ab48c1e8f9eeecef352 /src/mailman/rest/docs/helpers.rst
parent065060e56ac2445b6749b60480e9c42573854c5e (diff)
downloadmailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.gz
mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.zst
mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.zip
Diffstat (limited to 'src/mailman/rest/docs/helpers.rst')
-rw-r--r--src/mailman/rest/docs/helpers.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/rest/docs/helpers.rst b/src/mailman/rest/docs/helpers.rst
index 5bcf5cad4..2dd65bbb8 100644
--- a/src/mailman/rest/docs/helpers.rst
+++ b/src/mailman/rest/docs/helpers.rst
@@ -69,8 +69,9 @@ Another helper unpacks ``POST`` and ``PUT`` request variables, validating and
converting their values.
::
+ >>> import six
>>> from mailman.rest.validator import Validator
- >>> validator = Validator(one=int, two=unicode, three=bool)
+ >>> validator = Validator(one=int, two=six.text_type, three=bool)
>>> class FakeRequest:
... params = None
@@ -119,7 +120,7 @@ Extra keys are also not allowed.
However, if optional keys are missing, it's okay.
::
- >>> validator = Validator(one=int, two=unicode, three=bool,
+ >>> validator = Validator(one=int, two=six.text_type, three=bool,
... four=int, five=int,
... _optional=('four', 'five'))