diff options
Diffstat (limited to 'src/mailman/rest/docs')
| -rw-r--r-- | src/mailman/rest/docs/helpers.rst | 5 |
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')) |
