Unable to run unit tests when using PostGIS database backend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-django (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
LP: #905837 described an incompatibility between Django and the latest version of psycopg2. The fix for that issue was applied in 1.3.1-4ubuntu1. The problem is that the fix as applied does not solve the issue if using the PostGIS database backend. An additional one-line fix (patch attached) is needed.
The symptom of this problem is that applications built using PostGIS are unable to run any unit tests. The error shown is:
Got an error creating the test database: CREATE DATABASE cannot run inside a transaction block
The fix involves changing the class inheritance of django.
Django 1.4 removes django.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-django 1.3.1-4ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-24-virtual x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Thu May 24 20:54:11 2012
PackageArchitec
ProcEnviron:
TERM=xterm-
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: python-django
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "One-line patch to make PostGIS compatible with psycopg2 > 2.4.1" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]