我的代码是这样的:GAE - 如何在测试平台中使用blobstore存根?
self.testbed.init_blobstore_stub()
upload_url = blobstore.create_upload_url('/image')
upload_url = re.sub('^http://testbed\.example\.com', '', upload_url)
response = self.testapp.post(upload_url, params={
'shopid': id,
'description': 'JLo',
}, upload_files=[('file', imgPath)])
self.assertEqual(response.status_int, 200)
怎么就显示404错误?由于某些原因,上传路径似乎根本不存在。
http://stackoverflow.com/questions/10928339/how-to-simulate-image-upload-to-google-app-engine-blobstore/10929293#10929293 – alex