def test_router_defaults(oparg, retdict, assertone, asserttwo):
    """Test that the router level settings work and can be overridden at the op level"""
    api = NinjaAPI()
    router = Router(**{oparg: True})
    api.add_router("/", router)

    func1 = router.get("/test1", response=SomeResponse)(lambda request: retdict)
    func2 = router.get("/test2", response=SomeResponse, **{oparg: False})(
        lambda request: retdict
    )

    client = TestClient(api)

    assert getattr(func1._ninja_operation, oparg) is True
    assert getattr(func2._ninja_operation, oparg) is False

    assert client.get("/test1").json() == assertone
    assert client.get("/test2").json() == asserttwo
Test that the router level settings work and can be overridden at the op level
tests/test_router_defaults.py