fix: run existing test suite against string-pk, UUID-pk, and no-display-field models - #231
Open
stumpylog wants to merge 1 commit into
Open
fix: run existing test suite against string-pk, UUID-pk, and no-display-field models#231stumpylog wants to merge 1 commit into
stumpylog wants to merge 1 commit into
Conversation
…lay-field models - Fix string.letters (Python 2 only) to string.ascii_letters in CategoryWithStringPk - Add TransactionTestCase to ModelWithStringPkTestCase, ModelWithUUIDPkTestCase, and ModelWithoutDisplayFieldTestCase so they are collected by the test runner - Add treenode_display_field to CategoryWithoutDisplayField to enable display-related tests to pass on all four model tiers Override test_get_display and test_get_tree_display in ModelWithoutDisplayFieldTestCase to assert the pk-fallback behavior (get_display_text() returns str(pk)) rather than the name-based display that the other three tiers expect. This enables the test suite to run against all four concrete models (int pk, string pk, UUID pk, no-display-field) instead of just the int-pk tier. The test count increases from 85 to 232.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #231 +/- ##
==========================================
+ Coverage 95.07% 95.78% +0.70%
==========================================
Files 11 11
Lines 711 711
==========================================
+ Hits 676 681 +5
+ Misses 35 30 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
I wanted to explore some deeper changes, but found out not al the test suite was running. It seems at some historical point, they were missed in a refactor?
This enables the test suite to run against all four concrete models (int pk, string pk, UUID pk, no-display-field) instead of just the int-pk tier. The test count increases from 85 to 232.
Related issue
?
Checklist before requesting a review