diff options
| author | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
| commit | 44e43727be13e3554342c2b5b75b7dc42abdb18c (patch) | |
| tree | a0b97771f5d0856709ac8ab48c1e8f9eeecef352 /src/mailman/rest/docs/helpers.rst | |
| parent | 065060e56ac2445b6749b60480e9c42573854c5e (diff) | |
| download | mailman-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.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')) |
