Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path argument to NoMethod class #78

Merged
merged 3 commits into from
Dec 10, 2023
Merged

Conversation

eric-spitler
Copy link
Contributor

Resolves #77

Copy link
Member

@ahopkins ahopkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have confirmed that this does indeed solve the problem. However, can you add a test as well that demonstrates the expected behavior?

@eric-spitler
Copy link
Contributor Author

When I attempt to replicate it via testing on the current baseline, I can't get the issue to come up. It only seems to happen when I'm attaching the handlers to a Sanic instance. I suspect it is somewhere deeper in how Sanic finalizes/compiles the Router instance in a more in-depth way than is currently done in tests/test_routing.py

router = Router()
router.add("/<test:str>", handler1)
router.add("/<test:int>", handler2)
router.add("/<test:uuid>", handler3)
router.add("/<test:ymd>", handler4)
router.finalize()

However, Sanic is not a testing dependency (likely by design to prevent circular dependency issues), so I'm still trying to figure out how to emulate the full Router setup.

@ahopkins ahopkins merged commit 0f9405d into sanic-org:main Dec 10, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameterized Route returns 404 instead of 405
2 participants