#37175: Add database backend methods to get hardcoded or nonexistent primary key
values for tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Tim
| Graham
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* cc: Simon Charette (added)
* stage: Unreviewed => Accepted
Comment:
Hello Tim! Thank you for taking the time to create the report. I
understand your concerns and the issue that this raises for other
backends. I agree we could improve this situation by providing.
potentially, some hooks at the database backend layer, but I also think
that many of the tests currently hardcoding the PKs could be re-worked to
not use a PK at all, or at least not assume is an int.
Right now we are prioritizing 6.1 beta work, but I'll commit to do a more
informed triage/review of this ticket after beta (likely next week). I'm
accepting it right now since the problem statement is real, but I'd like
to evaluate other options for the solution, ideally a solution that would
not require a `get_hardcoded_pk()`. Have you considered posting in the
forum to see what our creative community can suggest?
Thanks for your patience!
--
Ticket URL: <
https://code.djangoproject.com/ticket/37175#comment:2>