forked from indymedia/epicyon
Extra test case
parent
863f329c96
commit
a9a3a8321d
19
tests.py
19
tests.py
|
@ -2139,6 +2139,25 @@ def testReplaceEmailQuote():
|
||||||
print('Expect: ' + expectedStr)
|
print('Expect: ' + expectedStr)
|
||||||
assert resultStr == expectedStr
|
assert resultStr == expectedStr
|
||||||
|
|
||||||
|
testStr = "<p><span class=\"h-card\">" + \
|
||||||
|
"<a href=\"https://somedomain/@somenick\" " + \
|
||||||
|
"class=\"u-url mention\">@<span>somenick</span>" + \
|
||||||
|
"</a></span> </p><p>> Text1.<br />> <br />" + \
|
||||||
|
"> Text2<br />> <br />> Text3<br />" + \
|
||||||
|
"><br />> Text4<br />> <br />> " + \
|
||||||
|
"Text5<br />> <br />> Text6</p><p>Text7</p>"
|
||||||
|
expectedStr = "<p><span class=\"h-card\">" + \
|
||||||
|
"<a href=\"https://somedomain/@somenick\" " + \
|
||||||
|
"class=\"u-url mention\">@<span>somenick</span></a>" + \
|
||||||
|
"</span> </p><p><blockquote> Text1.<br /><br />" + \
|
||||||
|
"Text2<br /><br />Text3<br /><br><br />Text4<br />" + \
|
||||||
|
"<br />Text5<br /><br />Text6</blockquote></p><p>Text7</p>"
|
||||||
|
resultStr = htmlReplaceEmailQuote(testStr)
|
||||||
|
if resultStr != expectedStr:
|
||||||
|
print('Result: ' + resultStr)
|
||||||
|
print('Expect: ' + expectedStr)
|
||||||
|
assert resultStr == expectedStr
|
||||||
|
|
||||||
|
|
||||||
def runAllTests():
|
def runAllTests():
|
||||||
print('Running tests...')
|
print('Running tests...')
|
||||||
|
|
Loading…
Reference in New Issue