mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21217 -- Avoid connecting (pre|post)_init signals to abstract senders.
This commit is contained in:
@@ -134,7 +134,7 @@ class ImageFieldTests(ImageFieldTestMixin, TestCase):
|
||||
p = self.PersonModel.objects.get(name="Joan")
|
||||
path = p.mugshot.path
|
||||
shutil.move(path, path + '.moved')
|
||||
p2 = self.PersonModel.objects.get(name="Joan")
|
||||
self.PersonModel.objects.get(name="Joan")
|
||||
|
||||
def test_delete_when_missing(self):
|
||||
"""
|
||||
@@ -412,7 +412,7 @@ class TwoImageFieldTests(ImageFieldTestMixin, TestCase):
|
||||
# was opened.
|
||||
self.assertEqual(p.mugshot.was_opened, False)
|
||||
self.assertEqual(p.headshot.was_opened, False)
|
||||
self.check_dimensions(p, 4, 8,'mugshot')
|
||||
self.check_dimensions(p, 4, 8, 'mugshot')
|
||||
self.check_dimensions(p, 8, 4, 'headshot')
|
||||
# After checking dimensions on the image fields, the files will
|
||||
# have been opened.
|
||||
@@ -422,7 +422,7 @@ class TwoImageFieldTests(ImageFieldTestMixin, TestCase):
|
||||
# check dimensions again, the file should not have opened.
|
||||
p.mugshot.was_opened = False
|
||||
p.headshot.was_opened = False
|
||||
self.check_dimensions(p, 4, 8,'mugshot')
|
||||
self.check_dimensions(p, 4, 8, 'mugshot')
|
||||
self.check_dimensions(p, 8, 4, 'headshot')
|
||||
self.assertEqual(p.mugshot.was_opened, False)
|
||||
self.assertEqual(p.headshot.was_opened, False)
|
||||
|
||||
Reference in New Issue
Block a user