Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#20010 closed Bug (fixed)

Tests for CaptureQueriesContext fail under Oracle

Reported by: Aymeric Augustin Owned by: Simon Charette
Component: Testing framework Version: dev
Severity: Release blocker Keywords:
Cc: Florian Apolloner Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

http://ci.djangoproject.com/job/Django%20Oracle/lastCompletedBuild/database=oracle,python=python2.7/testReport/test_utils.tests/CaptureQueriesContextManagerTests/

These tests were introduced in 952ba5237ea62e7647cdd5214b1df79c0e7cea38. They rely on query parameters being listed in connection._last_executed_query, which doesn't appear to be true under Oracle.

Two solutions:

  • change the tests for CaptureQueriesContext
  • change _last_executed_query to be more like SQLite

Attachments (1)

0001-Fixed-20010-Make-sure-last_executed_query-contains-i.patch (2.4 KB ) - added by Simon Charette 11 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Florian Apolloner, 11 years ago

Cc: Florian Apolloner added

comment:2 by Simon Charette, 11 years ago

Owner: changed from nobody to Simon Charette
Status: newassigned

I guess I should fix my own mess. I think I'll favor the behave-more-like-SQLite approach.

comment:3 by Simon Charette, 11 years ago

Added a patch I can't test.

comment:4 by Simon Charette, 11 years ago

Has patch: set

comment:5 by Aymeric Augustin, 11 years ago

Triage Stage: AcceptedReady for checkin

Tests pass with this patch under Oracle.

Do you think it's useful to add a line in the "backwards incompatible changes" section of the release notes?

comment:6 by Simon Charette, 11 years ago

That can't hurt, I'll adjust the patch.

comment:7 by Simon Charette, 11 years ago

Wondering if it's worth it, the change to SQLite3 wasn't documented AFAIK 6605ac331a9e03fa41c301d122c5727c0d98b970.

comment:8 by Aymeric Augustin, 11 years ago

It's your call!

comment:9 by Simon Charette <charette.s@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In bc7a10299f7ad7f468fa78d5990b7b545d4d599d:

Fixed #20010 -- Make sure last_executed_query contains it's associated parameters on Oracle.

Also removed some unused imports.

comment:10 by GitHub <noreply@…>, 5 years ago

In 79065b5:

Refs #20010 -- Unified DatabaseOperations.last_executed_query() on Oracle with other db backends.

Thanks Simon Charette for the review.

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