Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19391 closed Bug (fixed)

Oracle test failure in 1.5.x and master

Reported by: akaariai Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5-beta-1
Severity: Release blocker Keywords: oracle
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: no UI/UX: no

Description

The fix for #17911 (commit 29d59a879ea5b116cc31a2fd91be1f7562e487c2) doesn't work on Oracle. The reason is our old friend "lets treat as NULL".

The failure is this:

======================================================================
FAIL: test_change_form_renders_correct_null_choice_value (regressiontests.admin_views.tests.ReadonlyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/akaariai/Programming/django/tests/regressiontests/admin_views/tests.py", line 3211, in test_change_form_renders_correct_null_choice_value
    self.assertContains(response, '<p>No opinion</p>', html=True)
  File "/home/akaariai/Programming/django/tests/django/test/testcases.py", line 632, in assertContains
    msg_prefix + "Couldn't find '%s' in response" % text)
AssertionError: Couldn't find '<p>
No opinion
</p>' in response

I am marking this as a release blocker because it is expected that all tests pass on all supported databases on release. In any other sense this isn't severe at all.

Change History (2)

comment:1 Changed 2 years ago by Anssi Kääriäinen <akaariai@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 632cf32b43609f7d674c81f81f01eb9e4a059f1f:

Fixed #19391 -- Oracle specific failure in tests

The failure was caused by using None as a choice for a CharField. To
avoid Oracle's "" <-> NULL handling the field type was changed to
IntegerField.

comment:2 Changed 2 years ago by Anssi Kääriäinen <akaariai@…>

In 8c099ec3ec969ceef8de2e7fc90220b59cdf9b71:

[1.5.x] Fixed #19391 -- Oracle specific failure in tests

The failure was caused by using None as a choice for a CharField. To
avoid Oracle's "" <-> NULL handling the field type was changed to
IntegerField.

Backpatch of 632cf32b43609f7d674c81f81f01eb9e4a059f1f

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