1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.5.x] Removed US localflavor-specific tests from core

Also fixes #9045.
Backport of 8248d1402 from master.
This commit is contained in:
Claude Paroz
2012-12-08 20:58:59 +01:00
parent c81e8e7068
commit fce779475e
5 changed files with 6 additions and 48 deletions

View File

@@ -18,7 +18,7 @@ from django.utils import six
from .models import (Article, ArticleStatus, BetterWriter, BigInt, Book,
Category, CommaSeparatedInteger, CustomFieldForExclusionModel, DerivedBook,
DerivedPost, ExplicitPK, FlexibleDatePost, ImprovedArticle,
ImprovedArticleWithParentLink, Inventory, PhoneNumber, Post, Price,
ImprovedArticleWithParentLink, Inventory, Post, Price,
Product, TextFile, Writer, WriterProfile, test_images)
if test_images:
@@ -148,10 +148,6 @@ class WriterProfileForm(forms.ModelForm):
class Meta:
model = WriterProfile
class PhoneNumberForm(forms.ModelForm):
class Meta:
model = PhoneNumber
class TextFileForm(forms.ModelForm):
class Meta:
model = TextFile
@@ -167,7 +163,7 @@ class ModelFormWithMedia(forms.ModelForm):
'all': ('/some/form/css',)
}
class Meta:
model = PhoneNumber
model = TextFile
class CommaSeparatedIntegerForm(forms.ModelForm):
class Meta:
@@ -1149,12 +1145,6 @@ class OldFormForXTests(TestCase):
</select></p>
<p><label for="id_age">Age:</label> <input type="text" name="age" value="65" id="id_age" /></p>''' % (w_woodward.pk, w_bernstein.pk, bw.pk, w_royko.pk))
def test_phone_number_field(self):
f = PhoneNumberForm({'phone': '(312) 555-1212', 'description': 'Assistance'})
self.assertEqual(f.is_valid(), True)
self.assertEqual(f.cleaned_data['phone'], '312-555-1212')
self.assertEqual(f.cleaned_data['description'], 'Assistance')
def test_file_field(self):
# Test conditions when files is either not given or empty.