#14608: Adding a INPhoneNumberField to indian localflavor
---------------------------------------+-----------------------------------
Reporter: lawgon | Owner: lawgon
Type: New feature | Status: reopened
Milestone: | Component: contrib.localflavor
Version: SVN | Severity: Normal
Resolution: | Keywords: india phone
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 1 |
---------------------------------------+-----------------------------------
Changes (by julien):
* needs_better_patch: 0 => 1
Comment:
I tried your patch was the test wasn't run because it wasn't actually
hooked up to the test suite. I've fixed that in the attached patch by
updating `tests/regressiontests/forms/localflavortests.py` and
`tests/regressiontests/forms/tests/__init__.py`
Now, the test can be run but it raises this error:
{{{
======================================================================
ERROR: test_INPhoneNumberField
(regressiontests.forms.localflavor.in_.INLocalFlavorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/julien/.virtualenvs/djangotests/src/django/tests/regressiontests/forms/localflavor/in_.py",
line 24, in test_INPhoneNumberField
self.assertFieldOutput(INPhoneNumberField, valid, invalid)
File
"/Users/julien/.virtualenvs/djangotests/src/django/tests/regressiontests/forms/localflavor/utils.py",
line 41, in assertFieldOutput
required.clean, input
File
"/Users/julien/.virtualenvs/djangotests/src/django/django/utils/unittest/case.py",
line 991, in assertRaisesRegexp
expected_regexp = re.compile(expected_regexp)
File "/opt/local/lib/python2.5/re.py", line 188, in compile
return _compile(pattern, flags)
File "/opt/local/lib/python2.5/re.py", line 241, in _compile
raise error, v # invalid expression
error: bad character range
----------------------------------------------------------------------
}}}
Needs fixing :)
I'm not sure if that's the cause, but tests need to pass on Python 2.5.
--
Ticket URL: <http://code.djangoproject.com/ticket/14608#comment:21>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.