Kaydet (Commit) 55c81c36 authored tarafından Alex Gaynor's avatar Alex Gaynor

Converted Indonesian localflavor doctests to unittests. We have always been a…

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
üst 1eee7757
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.
......
# -*- coding: utf-8 -*-
from localflavor.cz import tests as localflavor_cz_tests
from localflavor.id import tests as localflavor_id_tests
from localflavor.ie import tests as localflavor_ie_tests
from localflavor.is_ import tests as localflavor_is_tests
from localflavor.it import tests as localflavor_it_tests
......@@ -30,13 +29,13 @@ from localflavor.es import ESLocalFlavorTests
from localflavor.fi import FILocalFlavorTests
from localflavor.fr import FRLocalFlavorTests
from localflavor.generic import GenericLocalFlavorTests
from localflavor.id import IDLocalFlavorTests
from localflavor.il import ILLocalFlavorTests
from localflavor.tr import TRLocalFlavorTests
__test__ = {
'localflavor_cz_tests': localflavor_cz_tests,
'localflavor_id_tests': localflavor_id_tests,
'localflavor_ie_tests': localflavor_ie_tests,
'localflavor_is_tests': localflavor_is_tests,
'localflavor_it_tests': localflavor_it_tests,
......
......@@ -26,6 +26,7 @@ from regressiontests.forms.localflavortests import (
FILocalFlavorTests,
FRLocalFlavorTests,
GenericLocalFlavorTests,
IDLocalFlavorTests,
ILLocalFlavorTests,
TRLocalFlavorTests,
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment