[Django] #33436: Test that is not correct (?)

5 views
Skip to first unread message

Django

unread,
Jan 13, 2022, 5:22:35 AM1/13/22
to django-...@googlegroups.com
#33436: Test that is not correct (?)
-------------------------------------+-------------------------------------
Reporter: raydeal | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: 4.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
I am in doubt what this test exactly test:
tests/foreign_object/test_empty_join.py

{{{
tests/foreign_object/test_empty_join.RestrictedConditionsTests.test_restrictions_with_no_joining_columns
}}}

The test was introduced in [https://code.djangoproject.com/ticket/25064
#25064], [https://code.djangoproject.com/ticket/27392 #27392] tickets and
two more small changes in test code.

In my opinion the test doesn't test django functionality important from
end user point of view or even development. It probably only test the idea
of the author. Tested model, its relational fields, are fully customised
not using public ORM API, just overwrite class methods.

I would suggest to delete the test because it doesn't bring an important
value to django code quality.

--
Ticket URL: <https://code.djangoproject.com/ticket/33436>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 13, 2022, 5:50:19 AM1/13/22
to django-...@googlegroups.com
#33436: Remove test_restrictions_with_no_joining_columns.

-------------------------------------+-------------------------------------
Reporter: raydeal | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix
* easy: 1 => 0


Comment:

Even though the `Join` is not a public API, we agreed in #25064, that
generating invalid SQL is a bug in this case. I don't see any harm in
keeping a regression test for #25064.

--
Ticket URL: <https://code.djangoproject.com/ticket/33436#comment:1>

Reply all
Reply to author
Forward
0 new messages