add test for video uploads longer than 30 seconds #956
Uploading videos longer than 30 seconds seems to be broken in master and 6.2.0.
This PR adds a spec for that. Unfortunately it incorrectly does pass, because the request is stubbed. I'm not sure what the right approach here is?
Either way, running the code in production does lead to problems.
Uploading an image works fine:
image = File.open("/…/image.jpg") # path abbreviated for readability twitter_client.update_with_media "foobar 123", [image]
Uploading a video raises an exception:
video = File.open("/…/video.mp4") # path abbreviated for readability twitter_client.update_with_media "foobar 456", [video]
Result in 6.2.0 (latest stable):
Twitter does support videos longer than 30 seconds however, when using chunked uploading which seems to be implemented in master. However, running the same code in master returns a different error:
Specifically, the error code is 324. From the Twitter Docs:
The video file passes all requirements. I tried uploading the same file through https://github.com/twitterdev/large-video-upload-python which worked fine.