HomePhabricator

phabricator: add custom vcr matcher to match request bodies

Authored by Kwan.

Description

phabricator: add custom vcr matcher to match request bodies

Currently when the phabricator extension's conduit output changes the tests
don't notice since the default vcr matcher only matches on 'method' and 'uri',
not the body.

Add a custom matcher that checks the same params are in the body (ignoring
ordering).

vcr's in-built body matcher can't be used since it fails under py3 with a
"UnicodeEncodeError" on the "€ in commit message" tests.

The DREV ids have decreased since the recordings were generated against a
different phabricator instance to avoid spamming mercurial-devel.

Differential Revision: https://phab.mercurial-scm.org/D6347

Details

Committed
KwanMay 5 2019, 12:04 PM
Differential Revision
D6347: phabricator: add custom vcr matcher to match request bodies
Parents
rHG838f3a094b4f: merge with stable
Branches
Unknown
Tags
Unknown