From 9452e7be8c37f2a407f43eab70d15d2f51b49be0 Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 31 Mar 2025 01:48:12 +0100 Subject: [PATCH] Update tests --- test_vx_embeds.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test_vx_embeds.py b/test_vx_embeds.py index 64ff255..56e0718 100644 --- a/test_vx_embeds.py +++ b/test_vx_embeds.py @@ -193,4 +193,15 @@ def test_embed_txt(): def test_embed_rtf(): resp = client.get(testTextTweet.replace("https://twitter.com","")+".rtf",headers={"User-Agent":"test"}) assert resp.status_code==200 - assert testTextTweet_compare["text"] in str(resp.data) \ No newline at end of file + assert testTextTweet_compare["text"] in str(resp.data) + +def test_embed_action(): + cache.clearCache() + resp = client.get(testTextTweet.replace("https://twitter.com",""),headers={"User-Agent":"test"}) + assert resp.status_code==200 + assert "application/activity+json" in str(resp.data) + assert "%F0%9F%92%96" in str(resp.data) # 💖 + resp = client.get(testTextTweet.replace("https://twitter.com",""),headers={"User-Agent":"Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)"}) + assert resp.status_code==200 + assert "application/activity+json" in str(resp.data) + assert "%F0%9F%92%96" not in str(resp.data) # 💖 \ No newline at end of file