This commit is contained in:
Dylan
2025-11-02 19:32:35 +00:00
parent 9d83c962e7
commit e5b9fb9824
3 changed files with 12 additions and 5 deletions

View File

@@ -1,10 +1,17 @@
import twitfix, cache, twExtract
import twitfix, cache, twExtract, utils
from vx_testdata import *
from twExtract import twUtils
def test_calcSyndicationToken():
assert twUtils.calcSyndicationToken("1691389765483200513") == "43lnobuxzql"
def test_stripEndTCO():
assert utils.stripEndTCO("Hello World https://t.co/abc123") == "Hello World"
assert utils.stripEndTCO("Hello\nWorld https://t.co/abc123") == "Hello\nWorld"
assert utils.stripEndTCO("Hello\nWorld\nhttps://t.co/abc123") == "Hello\nWorld"
assert utils.stripEndTCO("Hello\nWorld\n https://t.co/abc123") == "Hello\nWorld"
assert utils.stripEndTCO("Hello\nWorld \nhttps://t.co/abc123") == "Hello\nWorld"
def test_addToCache():
cache.clearCache()
twitfix.getTweetData(testTextTweet)