Add support for ?withFeed in API user requests

This commit is contained in:
Dylan
2025-04-27 17:30:07 +01:00
parent 84b620894f
commit 441b620b87
7 changed files with 73 additions and 22 deletions

View File

@@ -38,7 +38,14 @@ def test_api_include_rtf_nomedia():
assert not any(".rtf" in i for i in jData["mediaURLs"])
def test_api_user():
resp = client.get(testUser.replace("https://twitter.com","https://api.vxtwitter.com")+"?include_rtf=true",headers={"User-Agent":"test"})
resp = client.get(testUser.replace("https://twitter.com","https://api.vxtwitter.com"),headers={"User-Agent":"test"})
jData = resp.get_json()
assert resp.status_code==200
assert jData["screen_name"]=="jack"
assert jData["screen_name"]=="jack"
def test_api_user_feed():
resp = client.get(testUser.replace("https://twitter.com","https://api.vxtwitter.com")+"?withFeed=true",headers={"User-Agent":"test"})
jData = resp.get_json()
assert resp.status_code==200
assert jData["screen_name"]=="jack"
assert len(jData["latestTweets"])>0