Skip to content

Commit

Permalink
Fixed #18317 -- Removed db specific raw SQL function from tests
Browse files Browse the repository at this point in the history
A test in model_fields used LEN() in raw SQL. This function is not
available on some 3rd party backends. I removed this function and
ensured that the test works correctly (breaks pre e9bbdb3) with
the change.
  • Loading branch information
akaariai committed May 22, 2012
1 parent df7a65a commit 459c3b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/regressiontests/model_fields/tests.py
Expand Up @@ -208,7 +208,7 @@ def test_return_type(self):
# Verify that when an extra clause exists, the boolean
# conversions are applied with an offset
b5 = BooleanModel.objects.all().extra(
select={'string_length': 'LENGTH(string)'})[0]
select={'string_col': 'string'})[0]
self.assertFalse(isinstance(b5.pk, bool))

class ChoicesTests(test.TestCase):
Expand Down

0 comments on commit 459c3b6

Please sign in to comment.