##// END OF EJS Templates
phabricator: add custom vcr matcher to match request bodies...
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

File last commit:

r41073:d7d3164e stable
r42454:af13e208 default
Show More
phab-conduit.json
72 lines | 2.7 KiB | application/json | JsonLexer
Matt Harbison
phabricator: properly encode boolean types in the request body...
r41073 {
"interactions": [
{
"response": {
"status": {
"message": "OK",
"code": 200
},
"headers": {
"content-type": [
"application/json"
],
"date": [
"Fri, 21 Dec 2018 22:19:11 GMT"
],
"x-content-type-options": [
"nosniff"
],
"cache-control": [
"no-store"
],
"strict-transport-security": [
"max-age=0; includeSubdomains; preload"
],
"x-frame-options": [
"Deny"
],
"set-cookie": [
"phsid=A%2Fdv22bpksbdis3vfeksluagfslhfojblbnkro7we4; expires=Wed, 20-Dec-2023 22:19:11 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly"
],
"x-xss-protection": [
"1; mode=block"
],
"expires": [
"Sat, 01 Jan 2000 00:00:00 GMT"
],
"transfer-encoding": [
"chunked"
],
"server": [
"Apache/2.4.10 (Debian)"
]
},
"body": {
"string": "{\"result\":{\"data\":[],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}"
}
},
"request": {
"method": "POST",
"headers": {
"accept": [
"application/mercurial-0.1"
],
"content-type": [
"application/x-www-form-urlencoded"
],
"content-length": [
"70"
],
"host": [
"phab.mercurial-scm.org"
],
"user-agent": [
"mercurial/proto-1.0 (Mercurial 4.8.1+564-6f483b107eb5+20181221)"
]
},
"uri": "https://phab.mercurial-scm.org//api/user.search",
"body": "constraints%5BisBot%5D=true&api.token=cli-hahayouwish"
}
}
],
"version": 1
}