MCPcopy
hub / github.com/django/django / is_file

Function is_file

django/test/client.py:292–293  ·  view source on GitHub ↗
(thing)

Source from the content-addressed store, hash-verified

290
291 # Not by any means perfect, but good enough for our purposes.
292 def is_file(thing):
293 return hasattr(thing, "read") and callable(thing.read)
294
295 # Each bit of the multipart form data could be either a form value or a
296 # file, or a *list* of form values and/or files. Remember that HTTP field

Callers 1

encode_multipartFunction · 0.85

Calls 1

callableFunction · 0.85

Tested by

no test coverage detected