Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 5a11a30

Browse files
committed
fix tests for metadata creation following add of params arg
1 parent 3c81196 commit 5a11a30

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

twitter/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ def __call__(self, params={}, **kwargs):
235235

236236
# Shortcut call arguments for special json arguments case
237237
if "media/metadata/create" in uri:
238-
media_id = kwargs.pop('media_id', None)
239-
alt_text = kwargs.pop('alt_text', kwargs.pop('text', None))
238+
media_id = orig_kwargs.pop('media_id', None)
239+
alt_text = orig_kwargs.pop('alt_text', orig_kwargs.pop('text', None))
240240
if media_id and alt_text:
241241
jsondata = {
242242
"media_id": media_id,
243243
"alt_text": {"text": alt_text}
244244
}
245-
return self.__call__(_json=jsondata, params=params, **orig_kwargs)
245+
return self.__call__(params=params, _json=jsondata, **orig_kwargs)
246246

247247
method = kwargs.pop('_method', None) or method_for_uri(uri)
248248
domain = self.domain

0 commit comments

Comments
 (0)