]> git.ipfire.org Git - thirdparty/patchwork.git/commit
tests: Provide a way to disable API schema
authorStephen Finucane <stephen@that.guru>
Sat, 30 Nov 2019 18:48:35 +0000 (18:48 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 24 Dec 2019 11:15:21 +0000 (11:15 +0000)
commitcedfaa9e0b449a939a107794cdb2e61d323cc925
tree3d54ded144ae8830737d5b070998647772bd9c3e
parent83665b2a3a952a559b3ad2ec5236ef382c77e0c4
tests: Provide a way to disable API schema

The API schema validation is strict, in that it will error out with
invalid keys in either the request or response. Unfortunately the API
itself is not. We're hopefully going to fix this in a distant v2.0, but
for now we need a way to ensure that the API does what it's supposed to,
namely not set fields that don't exist or that the user isn't allowed to
set, even if proper error codes aren't raised.

This isn't actually used yet. That will come later.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/tests/api/utils.py
patchwork/tests/api/validator.py