mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
@@ -15,7 +15,6 @@ from django.core.checks import Error
|
||||
from django.forms.models import BaseModelFormSet
|
||||
from django.forms.widgets import Select
|
||||
from django.test import SimpleTestCase, TestCase
|
||||
from django.utils import six
|
||||
|
||||
from .models import (
|
||||
Band, Concert, ValidationTestInlineModel, ValidationTestModel,
|
||||
@@ -645,7 +644,7 @@ class CheckTestCase(SimpleTestCase):
|
||||
self.assertEqual(error.hint, hint)
|
||||
self.assertEqual(error.obj, invalid_obj)
|
||||
self.assertEqual(error.id, id)
|
||||
six.assertRegex(self, error.msg, msg)
|
||||
self.assertRegex(error.msg, msg)
|
||||
|
||||
def assertIsValid(self, model_admin, model):
|
||||
admin_obj = model_admin(model, AdminSite())
|
||||
|
||||
Reference in New Issue
Block a user