MCPcopy
hub / github.com/django/django / test_content_file_custom_name

Method test_content_file_custom_name

tests/files/tests.py:244–249  ·  view source on GitHub ↗

The constructor of ContentFile accepts 'name' (#16590).

(self)

Source from the content-addressed store, hash-verified

242 self.assertIsNone(ContentFile(b"content").name)
243
244 def test_content_file_custom_name(self):
245 """
246 The constructor of ContentFile accepts 'name' (#16590).
247 """
248 name = "I can have a name too!"
249 self.assertEqual(ContentFile(b"content", name=name).name, name)
250
251 def test_content_file_input_type(self):
252 """

Callers

nothing calls this directly

Calls 1

ContentFileClass · 0.90

Tested by

no test coverage detected