Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
tiangolo merged 3 commits into
fastapi:masterfrom
alv2017:bug-fix-tests-test-modules-same-name-body
Feb 27, 2025
Merged

✅ Fix a minor bug in the test tests/test_modules_same_name_body/test_main.py#13411
tiangolo merged 3 commits into
fastapi:masterfrom
alv2017:bug-fix-tests-test-modules-same-name-body

Conversation

@alv2017

@alv2017 alv2017 commented Feb 22, 2025

Copy link
Copy Markdown
Contributor

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

@svlandeg svlandeg left a comment

Copy link
Copy Markdown
Member

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

@tiangolo tiangolo left a comment

Copy link
Copy Markdown
Member

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
@alv2017 alv2017 deleted the bug-fix-tests-test-modules-same-name-body branch March 6, 2025 14:21
@njsbhu

This comment was marked as spam.

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.

4 participants