2013-05-17 19:31:41 +00:00
|
|
|
from django.core import management
|
|
|
|
from django.test import TestCase
|
2013-05-18 16:06:31 +00:00
|
|
|
from django.utils import six
|
2013-05-17 19:31:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ModelValidationTest(TestCase):
|
|
|
|
|
|
|
|
def test_models_validate(self):
|
|
|
|
# All our models should validate properly
|
|
|
|
# Validation Tests:
|
|
|
|
# * choices= Iterable of Iterables
|
|
|
|
# See: https://code.djangoproject.com/ticket/20430
|
2013-11-02 19:16:33 +00:00
|
|
|
# * related_name='+' doesn't clash with another '+'
|
|
|
|
# See: https://code.djangoproject.com/ticket/21375
|
2013-05-18 16:06:31 +00:00
|
|
|
management.call_command("validate", stdout=six.StringIO())
|