Conversation
|
Just closed without any comments? |
|
The PR says Fix tests, but tests work on master and the CI status is a failing tests. Can you elaborate on what you are trying to do? |
|
Have you read the description? One line change -- is something that actually runs the tests which are failing, you're right. |
|
There is nothing to fix in the tests. I think it is better to keep the test case from my PR but |
Codecov Report
@@ Coverage Diff @@
## master #381 +/- ##
==========================================
+ Coverage 91.72% 91.77% +0.05%
==========================================
Files 6 6
Lines 761 766 +5
==========================================
+ Hits 698 703 +5
Misses 63 63
Continue to review full report at Codecov.
|
|
Agreed
|
This catch was introduced in jazzband#367, but subsequent discussion in jazzband#370, jazzband#381 and jazzband#382 suggests that it wasn't the proper solution. Now that `AbstractModelTrackerTests` is re-enabled and passing, it becomes clear that `AttributeError` is no longer raised during unit testing when using a recent Django version. Therefore I think it is safe to remove the `try`/`except`.
This catch was introduced in jazzband#367, but subsequent discussion in jazzband#370, jazzband#381 and jazzband#382 suggests that it wasn't the proper solution. Now that `AbstractModelTrackerTests` is re-enabled and passing, it becomes clear that `AttributeError` is no longer raised during unit testing when using a recent Django version. Therefore I think it is safe to remove the `try`/`except`.
Problem
I have found that
AbstractModelTrackerTestsis not quite correct.Since it inherited from
FieldTrackerTestCasethat just implements some extra assertions, there are no actual tests for this case.Solution
I have fixed
AbstractModelTrackerTestsand it seems that some tests are failed for the case with models inherited from some AbstractModel with fields defined (like AbstractUser and its children)