Opened 11 years ago
Last modified 3 days ago
#21286 assigned Bug
Fix commented out tests in serializers.test_data — at Version 5
Reported by: | Tim Graham | Owned by: | nobody |
---|---|---|---|
Component: | Core (Serialization) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | bmispelon@…, Adam Zapletal, Ülgen Sarıkavak | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
tests/serializers/test_data.py
contains some commented out items in the test_data
list. I think it may be because not all serializers support those items. If this is the case, we should make appropriate modifications so the tests are run where they are supported and skipped where not.
Change History (5)
comment:1 by , 11 years ago
Cc: | added |
---|
comment:5 by , 7 years ago
Description: | modified (diff) |
---|---|
Summary: | Fix commented out tests in serializers_regress → Fix commented out tests in serializers.test_data |
Note:
See TracTickets
for help on using tickets.
While looking into this, I believe I found the reason why some of the tests are commented: https://github.com/django/django/blob/8d6953d55c3aba04bbaf0f268499d6e405c653ff/tests/serializers_regress/models.py#L168-L170
The comment is not completely correct however because a few of the commented out models trigger and error immediately, regardless of the backend (
TypeError: 'primary_key' is not a valid argument for ...
).FilePKData
,ImagePKData
andNullBooleanPKData
can be deleted because of this.DatePKData
,DateTimePKData
,TimePKData
andTextPKData
might be database-dependent (they all work under sqlite).FileData
) might be worth looking into a bit deeper. It fails when uncommented and I believe it might be caused by the weirdFileField.__eq__
implementation.