diff --git a/tests.py b/tests.py index 7fcdccd03..b9bac2492 100644 --- a/tests.py +++ b/tests.py @@ -2978,9 +2978,36 @@ def testFunctions(): '-Gsep=+120 -Tx11 epicyon.dot') +def testLinksWithinPost() -> None: + baseDir = os.getcwd() + nickname = 'test27636' + domain = 'rando.site' + port = 443 + httpPrefix = 'https' + content = 'This is a test post with links.\n\n' + \ + 'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://freedombone.net' + postJsonObject = \ + createPublicPost(baseDir, nickname, domain, port, httpPrefix, + content, + False, False, False, True, + None, None, False, None) + assert postJsonObject['object']['content'] == \ + '
This is a test post with links.
' + \
+ '' + \
+ 'ftp://' + \
+ '' + \
+ 'ftp.ncdc.noaa.gov/pub/data/ghcn/v4/' + \
+ '
' + \
+ 'https://' + \
+ 'freedombone.net