Opened 13 years ago
Closed 13 years ago
#18317 closed Bug (fixed)
Raw sql in regressiontests.model_fields.tests.BooleanFieldTests.test_return_type fails with mssql
Reported by: | Michael Manfre | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
MSSQL calls its user LENGTH function, LEN.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | django-ticket18317.diff added |
---|
comment:1 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
I support the idea of allowing the tests to pass on different backends than the core backends.
I am not sure if checking the connection vendor is the right thing to do. Usually we use some connection.ops.sql_for_string_len(), but as this is used just in testing, that does seem wrong approach, too.
How about using something else than LEN() there? It doesn't seem to matter what function is used in there (in fact, you don't need any function in there, right?). So, just get rid of the LEN() call altogether.
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Adjusts raw SQL depending on connection vendor.