mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Switched TestCase to SimpleTestCase where possible in Django's tests.
This commit is contained in:
@@ -3,14 +3,14 @@ from django.core.exceptions import NON_FIELD_ERRORS
|
||||
from django.test import TestCase
|
||||
from django.utils.functional import lazy
|
||||
|
||||
from . import ValidationTestCase
|
||||
from . import ValidationAssertions
|
||||
from .models import (
|
||||
Article, Author, GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest,
|
||||
ModelToValidate,
|
||||
)
|
||||
|
||||
|
||||
class BaseModelValidationTests(ValidationTestCase):
|
||||
class BaseModelValidationTests(ValidationAssertions, TestCase):
|
||||
|
||||
def test_missing_required_field_raises_error(self):
|
||||
mtv = ModelToValidate(f_with_custom_validator=42)
|
||||
@@ -126,7 +126,7 @@ class ModelFormsTests(TestCase):
|
||||
self.assertEqual(list(form.errors), ['pub_date'])
|
||||
|
||||
|
||||
class GenericIPAddressFieldTests(ValidationTestCase):
|
||||
class GenericIPAddressFieldTests(ValidationAssertions, TestCase):
|
||||
|
||||
def test_correct_generic_ip_passes(self):
|
||||
giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
|
||||
|
||||
Reference in New Issue
Block a user