Opened 18 months ago

Last modified 18 months ago

#21286 new Bug

Fix commented out tests in serializers_regress

Reported by: timo Owned by: nobody
Component: Core (Serialization) Version: master
Severity: Normal Keywords:
Cc: bmispelon@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


tests/serializers_regress/ 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 (1)

comment:1 Changed 18 months ago by bmispelon

  • Cc bmispelon@… added

While looking into this, I believe I found the reason why some of the tests are commented:

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 and NullBooleanPKData can be deleted because of this.
  • DatePKData, DateTimePKData, TimePKData and TextPKData might be database-dependent (they all work under sqlite).
  • Test case 51 (FileData) might be worth looking into a bit deeper. It fails when uncommented and I believe it might be caused by the weird FileField.__eq__ implementation.
Note: See TracTickets for help on using tickets.
Back to Top