MCPcopy Create free account
hub / github.com/Pylons/webtest / UploadBinaryApp

Class UploadBinaryApp

tests/test_forms.py:865–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863
864
865class UploadBinaryApp(SingleUploadFileApp):
866
867 def get_files_page(self, req):
868 uploaded_files = [(k, v) for k, v in req.POST.items() if 'file' in k]
869 data = uploaded_files[0][1].value
870 data = struct.unpack(b'255h', data[:510])
871 return b','.join([to_bytes(str(i)) for i in data])
872
873
874class SeveralSingleFileApp(SingleUploadFileApp):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…