MCPcopy
hub / github.com/django/django / create_image

Method create_image

tests/delete_regress/tests.py:183–196  ·  view source on GitHub ↗

Return an Image referenced by both a FooImage and a FooFile.

(self)

Source from the content-addressed store, hash-verified

181 """
182
183 def create_image(self):
184 """Return an Image referenced by both a FooImage and a FooFile."""
185 # Create an Image
186 test_image = Image()
187 test_image.save()
188 foo_image = FooImage(my_image=test_image)
189 foo_image.save()
190
191 # Get the Image instance as a File
192 test_file = File.objects.get(pk=test_image.pk)
193 foo_file = FooFile(my_file=test_file)
194 foo_file.save()
195
196 return test_image
197
198 def test_delete_proxy(self):
199 """

Callers 3

test_delete_proxyMethod · 0.95

Calls 5

FooImageClass · 0.85
FooFileClass · 0.85
ImageClass · 0.70
saveMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected