(self, file_object, content_type=None, filename=None)
| 1433 | self.__dict__[name] = value |
| 1434 | |
| 1435 | def add_file(self, file_object, content_type=None, filename=None): |
| 1436 | if not hasattr(file_object, "read"): |
| 1437 | raise TypeError("file-like object must have read method") |
| 1438 | if content_type is not None and not isstringlike(content_type): |
| 1439 | raise TypeError("content type must be None or string-like") |
| 1440 | if filename is not None and not isstringlike(filename): |
| 1441 | raise TypeError("filename must be None or string-like") |
| 1442 | if content_type is None: |
| 1443 | content_type = "application/octet-stream" |
| 1444 | self._upload_data.append((file_object, content_type, filename)) |
| 1445 | |
| 1446 | def _totally_ordered_pairs(self): |
| 1447 | # XXX should it be successful even if unnamed? |
nothing calls this directly
no test coverage detected