1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Converted Indonesian localflavor doctests to unittests. We have always been a war with doctests. Thanks to Idan Gazit.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2010-12-18 20:31:00 +00:00
parent 1eee7757b7
commit 55c81c36e6
4 changed files with 194 additions and 168 deletions

View File

@@ -1,9 +1,18 @@
from django.core.exceptions import ValidationError
from django.core.validators import EMPTY_VALUES
from django.test.utils import get_warnings_state, restore_warnings_state
from django.utils.unittest import TestCase
class LocalFlavorTestCase(TestCase):
# NOTE: These are copied from the TestCase Django uses for tests which
# access the database
def save_warnings_state(self):
self._warnings_state = get_warnings_state()
def restore_warnings_state(self):
restore_warnings_state(self._warnings_state)
def assertFieldOutput(self, fieldclass, valid, invalid, field_args=[],
field_kwargs={}, empty_value=u''):
"""Asserts that a field behaves correctly with various inputs.