MCPcopy Index your code
hub / github.com/encode/django-rest-framework / test_upload_file

Method test_upload_file

tests/test_testing.py:342–347  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

340 assert response.data['user'] == 'example'
341
342 def test_upload_file(self):
343 # This is a 1x1 black png
344 simple_png = BytesIO(b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4\x89\x00\x00\x00\rIDATx\x9cc````\x00\x00\x00\x05\x00\x01\xa5\xf6E@\x00\x00\x00\x00IEND\xaeB`\x82')
345 simple_png.name = 'test.png'
346 factory = APIRequestFactory()
347 factory.post('/', data={'image': simple_png})
348
349 def test_request_factory_url_arguments(self):
350 """

Callers

nothing calls this directly

Calls 2

postMethod · 0.95
APIRequestFactoryClass · 0.90

Tested by

no test coverage detected