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

Fix test warnings #959

Merged
merged 1 commit into from
Mar 12, 2023
Merged

Fix test warnings #959

merged 1 commit into from
Mar 12, 2023

Conversation

Incred
Copy link
Contributor

@Incred Incred commented Mar 12, 2023

Fix RuntimeWarning during testing:

tests/test_regressions.py::test_serializer_foreign_key_default_value_handling                                                                                                                                        
  /home/incred/dev/drf-spectacular/venv/lib64/python3.11/site-packages/django/db/models/base.py:364: RuntimeWarning: Model 'tests.m10' was already registered. Reloading models is not advised as it can lead to inco
nsistencies, most notably with related models.                                                                                                                                                                       
    new_class._meta.apps.register_model(new_class._meta.app_label, new_class)                                                                                                                                        
                                                                                                                                                                                                                     
tests/test_regressions.py::test_serializer_foreign_key_default_value_handling
  /home/incred/dev/drf-spectacular/venv/lib64/python3.11/site-packages/django/db/models/base.py:364: RuntimeWarning: Model 'tests.m11' was already registered. Reloading models is not advised as it can lead to inco
nsistencies, most notably with related models.
    new_class._meta.apps.register_model(new_class._meta.app_label, new_class)

Renamed those model's classes using new names to avoid warnings.

@codecov
Copy link

codecov bot commented Mar 12, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (06a39ad) 98.62% compared to head (3f8ed7f) 98.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #959   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files          68       68           
  Lines        8216     8216           
=======================================
  Hits         8103     8103           
  Misses        113      113           
Impacted Files Coverage Δ
tests/test_regressions.py 99.94% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tfranzel
Copy link
Owner

🤦 ..... thanks @Incred!

@tfranzel tfranzel merged commit 3f83a0d into tfranzel:master Mar 12, 2023
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