mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[1.8.x] Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts5643a3b51b
and81e1a35c36
. Thanks Carl Meyer for review. Backport of5980b05c1f
from master
This commit is contained in:
parent
90c7078f48
commit
e4b813c0e7
15 changed files with 107 additions and 195 deletions
|
@ -12,7 +12,7 @@ from django.contrib.admin.utils import (
|
|||
)
|
||||
from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
|
||||
from django.db import DEFAULT_DB_ALIAS, models
|
||||
from django.test import TestCase
|
||||
from django.test import SimpleTestCase, TestCase
|
||||
from django.utils import six
|
||||
from django.utils.formats import localize
|
||||
from django.utils.safestring import mark_safe
|
||||
|
@ -94,7 +94,8 @@ class NestedObjectsTests(TestCase):
|
|||
n.collect([Vehicle.objects.first()])
|
||||
|
||||
|
||||
class UtilsTests(TestCase):
|
||||
class UtilsTests(SimpleTestCase):
|
||||
|
||||
def test_values_from_lookup_field(self):
|
||||
"""
|
||||
Regression test for #12654: lookup_field
|
||||
|
@ -112,7 +113,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