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

TST: use app, client fixture to reuse in tests #1060

Closed

Conversation

pratapvardhan
Copy link
Contributor

@vincentsarago – thoughts on reusing fixtures? Reduces the need to keep defining client in every case.

return TestClient(app)


def test_lowercase_middleware(app, client):
Copy link
Member

Choose a reason for hiding this comment

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

We don't need the app fixture here then

Copy link
Member

Choose a reason for hiding this comment

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

ah no we need it, But then it's a bit weird that we register the endpoint after creating the application 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct, we can leave it as it is and close this PR if the change doesn't seem clean enough.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I'm not convinced we need this change, sorry 🙏

@pratapvardhan pratapvardhan deleted the test_case_middleware branch December 23, 2024 05:49
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.

2 participants