mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts5643a3b51band81e1a35c36. Thanks Carl Meyer for review.
This commit is contained in:
parent
12f91f6ebd
commit
5980b05c1f
15 changed files with 106 additions and 198 deletions
|
|
@ -12,7 +12,7 @@ from django.contrib.admin.utils import (
|
|||
label_for_field, lookup_field, quote,
|
||||
)
|
||||
from django.db import DEFAULT_DB_ALIAS, models
|
||||
from django.test import TestCase, override_settings
|
||||
from django.test import SimpleTestCase, TestCase, override_settings
|
||||
from django.utils import six
|
||||
from django.utils.formats import localize
|
||||
from django.utils.safestring import mark_safe
|
||||
|
|
@ -94,7 +94,7 @@ class NestedObjectsTests(TestCase):
|
|||
n.collect([Vehicle.objects.first()])
|
||||
|
||||
|
||||
class UtilsTests(TestCase):
|
||||
class UtilsTests(SimpleTestCase):
|
||||
|
||||
empty_value = '-empty-'
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ class UtilsTests(TestCase):
|
|||
|
||||
simple_function = lambda obj: SIMPLE_FUNCTION
|
||||
|
||||
site_obj = Site.objects.create(domain=SITE_NAME)
|
||||
site_obj = Site(domain=SITE_NAME)
|
||||
article = Article(
|
||||
site=site_obj,
|
||||
title=TITLE_TEXT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue