﻿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
15170	inspectdb test fails under MySQL MyISAM	Russell Keith-Magee	nobody	"As of r15325, the inspectdb test fails under MySQL MyISAM. It passes under InnoDB. 

{{{
======================================================================
FAIL: test_attribute_name_not_python_keyword (regressiontests.inspectdb.tests.InspectDBTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/Users/rkm/projects/django/hg/tests/regressiontests/inspectdb/tests.py"", line 13, in test_attribute_name_not_python_keyword
    self.assertIn(""from_field = models.ForeignKey(InspectdbPeople)"", out.getvalue())
AssertionError: 'from_field = models.ForeignKey(InspectdbPeople)' not found in u""# This is an auto-generated Django model ...

----------------------------------------------------------------------
Ran 1 test in 0.188s

FAILED (failures=1)
}}}

Note - I've truncated the output because it runs to thousands of characters on one line.

The problem is that MySQL's introspection backend doesn't identify foreign keys -- it identifies them as integer fields. As a result, the test fails because the field 'from' is identified as 'from_id', which isn't a colliding name.

Given that this is a limitation of MyISAM, we probably just need to skip the test -- which means we need a new live capability check in the features backend (can_introspect_foreign_key, or simliar). Unless, of course, someone can find a nifty way to fix the introspection."		closed	Testing framework	1.2		fixed	blocker regression		Accepted	0	0	0	0	0	0
