﻿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
6122	Update tests to check for new maxlength + max_length TypeError wording	mcroydon	nobody	"Changeset [6872] introduced new wording for the TypeError raised when both maxlength and max_length are specified.  This patch updates the tests to look for the new wording instead of the old.  The test is doing the right thing just failing because of the difference in wording.  Here's an example of the failing tests:
{{{ 
======================================================================
FAIL: Doctest: regressiontests.maxlength.tests
----------------------------------------------------------------------
Traceback (most recent call last):   
  File ""/home/mcroydon/test/django/test/_doctest.py"", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.maxlength.tests
  File ""/home/mcroydon/code/django-trunk/tests/regressiontests/maxlength/tests.py"", line 2, in tests

----------------------------------------------------------------------
File ""/home/mcroydon/code/django-trunk/tests/regressiontests/maxlength/tests.py"", line 22, in regressiontests.maxlength.tests
Failed example:
    legacy_maxlength(10, 12)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: field can not take both the max_length argument and the legacy maxlength argument.
Got:
    Traceback (most recent call last):
      File ""/home/mcroydon/test/django/test/_doctest.py"", line 1267, in __run
        compileflags, 1) in test.globs
      File ""<doctest regressiontests.maxlength.tests[6]>"", line 1, in ?
        legacy_maxlength(10, 12)
      File ""/home/mcroydon/test/django/utils/maxlength.py"", line 26, in legacy_maxlength
        raise TypeError(""Field cannot take both the max_length argument and the legacy maxlength argument."")
    TypeError: Field cannot take both the max_length argument and the legacy maxlength argument. 
}}}

After applying the patch the tests pass."		closed	Testing framework	dev		fixed			Unreviewed	1	0	0	0	0	0
