Skip to content

✅ Fix a minor bug in the test tests/test_modules_same_name_body/test_main.py #13411

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

Merged

Conversation

alv2017
Copy link
Contributor

@alv2017 alv2017 commented Feb 22, 2025

Description:
1.

data = response.json()

has been replaced with the assertion statement

assert data == response.json()

Tests parametrization applied to reduce the duplicated code

@alv2017 alv2017 marked this pull request as ready for review February 22, 2025 23:48
@alv2017 alv2017 changed the title Fixes a minor bug in test: tests/test_modules_same_name_body/test_main.py Fixes a minor bug in a test: tests/test_modules_same_name_body/test_main.py Feb 23, 2025
@svlandeg svlandeg changed the title Fixes a minor bug in a test: tests/test_modules_same_name_body/test_main.py ✅ Fix a minor bug in the test file tests/test_modules_same_name_body/test_main.py Feb 24, 2025
Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

Good catch with the missing assert!

Also a good idea to use parametrize here and avoid code duplication to test all corner cases.

Should be ready to merge 🥳

@svlandeg svlandeg changed the title ✅ Fix a minor bug in the test file tests/test_modules_same_name_body/test_main.py ✅ Fix a minor bug in the test tests/test_modules_same_name_body/test_main.py Feb 24, 2025
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

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

Thank you! 🚀 🎉

@tiangolo tiangolo merged commit 7eabff4 into fastapi:master Feb 27, 2025
31 of 32 checks passed
@alv2017 alv2017 deleted the bug-fix-tests-test-modules-same-name-body branch March 6, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants