field_subclassing test failing, needs to use get_prep_lookup
|Reported by:||Gabriel Hurley||Owned by:||Gabriel Hurley|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I ran the full unit test suite this morning (Windows, SQLite3), and found that the field_subclassing tests were failing because the expected error for an invalid
lookup_type wasn't being raised.
It turns out that the test had not been updated to reflect
get_prep_lookup() being factored out of
This patch corrects that, and raises a TypeError instead of a FieldError, since the docs say "Your method must be prepared to handle all of these lookup_type values and should raise [...] a TypeError if your field does not support that type of lookup."
Patch is attached, and the test now passes.
Change History (10)
comment:1 Changed 7 years ago by
|Patch needs improvement:||unset|