def test_router2_throttling():
    "Here we test that child router inherits the throttling from api instance"
    th = AnonRateThrottle("1/s")
    set_throttle_timer(th, 0)

    api = NinjaAPI(throttle=th)
    router = Router()

    @router.get("/check")
    def check(request):
        return "OK"

    api.add_router("/router", router)

    client = TestClient(api)

    resp = client.get("/router/check")
    assert resp.status_code == 200
    assert resp.content == b'"OK"'

    resp = client.get("/router/check")
    assert resp.status_code == 429
    assert resp.json() == {"detail": "Too many requests."}
Here we test that child router inherits the throttling from api instance
tests/test_throttling.py