Closed mgorny closed 1 year ago
Nothing prevents using pytest-httpbin. It didn't exist when things were first written and I didn't find anything similar at the time.
Ah, cool. Does that mean you're likely to do it or more like you're open to pull requests if somebody else does it?
Ah, cool. Does that mean you're likely to do it or more like you're open to pull requests if somebody else does it?
It'll happen faster if someone else opens the PR. Otherwise it'll get throw onto my TODO list with fairly low priority since it's just a testing improvement and not a super meaningful change for clients.
It should be trivial but right now httpbin doesn't work out of the box without patching or restricting werkzeug version, and I think it's better to solve that at pytest-httpbin level than add workarounds here. I've asked for a workaround on https://github.com/kevin1024/pytest-httpbin/issues/72.
Ok, httpbin
is fixed now. However, FWICS the test suite is currently using the unittest-based class approach which is incompatible with pytest fixtures. Would you mind me rewriting the test suite to use pure pytest?
Would you mind me rewriting the test suite to use pure pytest?
Should be fine. Don't imagine it changes much.
Actually, I've found out how to combine fixtures with unittest-style tests, so I managed without ;-). I'll submit a "minimal change" PR in a minute.
Is there a specific need to use a public httpbin service during tests? E.g. pytest-httpbin can easily provide the equivalent service locally and would make the test suite work reliably independently of the current state of Internet connection and the remote service.