deleted = self.api.destroy_status(id=update.id)
self.assertEqual(deleted.id, update.id)
+ @tape.use_cassette('testupdateanddestroystatus.json')
+ def testupdateanddestroystatuswithoutkwarg(self):
+ # test update, passing text as a positional argument (#554)
+ text = tweet_text if use_replay else 'testing %i' % random.randint(0, 1000)
+ update = self.api.update_status(text)
+ self.assertEqual(update.text, text)
+
+ # test destroy
+ deleted = self.api.destroy_status(id=update.id)
+ self.assertEqual(deleted.id, update.id)
+
@tape.use_cassette('testupdatestatuswithmedia.yaml', serializer='yaml')
def testupdatestatuswithmedia(self):
update = self.api.update_with_media('examples/banner.png', status=tweet_text)
allowed_param=['id']
)
- def update_status(self, media_ids=None, *args, **kwargs):
+ def update_status(self, *args, **kwargs):
""" :reference: https://dev.twitter.com/rest/reference/post/statuses/update
:allowed_param:'status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates', 'media_ids'
"""
post_data = {}
+ media_ids = kwargs.pop("media_ids", None)
if media_ids is not None:
post_data["media_ids"] = list_to_csv(media_ids)