﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20198	fixtures.FixtureLoadingTests.test_loaddata_error_message fails on Postgres 9.2	Chris Lawlor	nobody	"Running the 'fixtures' tests against PostgreSQL 9.2.3 fails as follows:

{{{
======================================================================
FAIL: test_loaddata_error_message (modeltests.fixtures.tests.FixtureLoadingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/clawlor/code/django/tests/modeltests/fixtures/tests.py"", line 255, in test_loaddata_error_message
    management.call_command('loaddata', 'invalid.json', verbosity=0, commit=False)
AssertionError: ""Could not load fixtures.Article\(pk=1\): .*$"" does not match ""Problem installing fixture '/home/clawlor/code/django/tests/modeltests/fixtures/fixtures/invalid.json': Could not load fixtures.Article(pk=1): null value in column ""pub_date"" violates not-null constraint
DETAIL:  Failing row contains (1, Breaking news, null).
""

----------------------------------------------------------------------

}}}


The failure is due to the newline in the exception message after the word 'constraint'. The test regex expects a match ending with "".*$"", which does result in a match against a string containing a newline character that is not at the end of the string.

This test does not fail against PostgreSQL 9.1. The version of psycopg2 used does not matter.

The behavior being tested is clearly not broken, this is a simple matter of updating the test regex. A patch is included which removes the ""$"" requirement.
"	Bug	closed	Testing framework	dev	Normal	worksforme			Unreviewed	1	0	0	0	0	0
