Closed lundberg closed 12 months ago
I'd like to address this issue. Is it just removing this kwarg? https://github.com/lundberg/respx/blob/master/respx/router.py#L43
Also should this project have a CONTRIBUTING.md?
I'd like to address this issue. Is it just removing this kwarg? https://github.com/lundberg/respx/blob/master/respx/router.py#L43
Yes, since it doesn't affect anything and is a noop when a plain Router
is used.
But to make it clear, the kwarg is kept here for the MockRouter
used by respx.mock(...)
. So, the super call need to be adjusted there as well, so that the setting is not lost for the mock router and its decorator/contextmanager features.
Also should this project have a CONTRIBUTING.md?
Yeah, that's probably a good idea, e.g. I should describe how to run tests, linting etc 😉
Revisiting this now and actually changed my mind @BeyondEvil 😂
I think we should keep the assert_all_called
kwarg/setting since my suggestion by manually calling it in #228 is a working solution.
I'll probably just update the docs and trying to mention this when using the Router
manually without any context managers used.
The base
Router
makes no use of theassert_all_called
kwarg.It should therefor be dropped from
Router
, but kept and only usable in the mainMockRouter
.Also extend Router documentation with an example on how to assert that all routes was called.