Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#20158 closed Bug (fixed)

Test models for pickled querysets have invalid code

Reported by: Baptiste Mispelon Owned by: Baptiste Mispelon
Component: Testing framework Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The models located in tests/queryset_pickle/models.py use some defaults that can't actually be called.

This doesn't show when running the tests because no models are actually created so the problematic functions are never called.

The standalone_number function and the Numbers.get_static_number static method shouldn't actually take any parameter.

Change History (3)

comment:1 Changed 4 years ago by Baptiste Mispelon

Has patch: set
Owner: changed from nobody to Baptiste Mispelon
Status: newassigned

PR here: https://github.com/django/django/pull/975

I fixed both function's signatures and added a setUp method on the testcase that creates a Happening instance.

comment:2 Changed 4 years ago by Baptiste Mispelon <bmispelon@…>

Resolution: fixed
Status: assignedclosed

In a40746b1cbc912119f9f873614017953b17a4d7a:

Fix #20158: invalid code in queryset_pickle test models.

comment:3 Changed 4 years ago by Claude Paroz <claude@…>

In 24e710e65995b7f9edcd44efb81ae2681808e7ca:

Merge pull request #975 from bmispelon/ticket-20158

Fix #20158: invalid code in queryset_pickle test models.

Note: See TracTickets for help on using tickets.
Back to Top