コード例 #1
0
 def make_blobfile(self,
                   filename='bf.txt',
                   content='hello world',
                   content_type='text/plain'):
     bf = NyBlobFile(
         filename=filename, content_type=content_type,
         timestamp=datetime.utcnow(), contributor='tester')
     bf.removed = False
     bf.size = len(content)
     f = bf.open_write()
     f.write(content)
     f.close()
     return bf
コード例 #2
0
 def make_blobfile(self,
                   filename='bf.txt',
                   content='hello world',
                   content_type='text/plain'):
     bf = NyBlobFile(filename=filename,
                     content_type=content_type,
                     timestamp=datetime.utcnow(),
                     contributor='tester')
     bf.removed = False
     bf.size = len(content)
     f = bf.open_write()
     f.write(content)
     f.close()
     return bf