mirror of https://gitlab.com/bashrc2/epicyon
Extra test
parent
4e59beab16
commit
cc5fe5cefa
10
tests.py
10
tests.py
|
@ -8252,6 +8252,12 @@ def _test_book_link(base_dir: str):
|
||||||
result = get_book_link_from_content(content)
|
result = get_book_link_from_content(content)
|
||||||
assert result == book_url
|
assert result == book_url
|
||||||
|
|
||||||
|
book_url = 'https://en.wikipedia.org/wiki/The_Arasaka_Brainworm'
|
||||||
|
content = "<p>wants to read <a href=\"" + book_url + \
|
||||||
|
"\"><i>Title</i></a></p>"
|
||||||
|
result = get_book_link_from_content(content)
|
||||||
|
assert result == book_url
|
||||||
|
|
||||||
book_url = 'https://bookwyrm.instance/user/hj/1234567'
|
book_url = 'https://bookwyrm.instance/user/hj/1234567'
|
||||||
content = 'xyz wants to read <a ' + \
|
content = 'xyz wants to read <a ' + \
|
||||||
'href="' + book_url + '"><i>Title</i></a>'
|
'href="' + book_url + '"><i>Title</i></a>'
|
||||||
|
@ -8272,8 +8278,8 @@ def _test_book_link(base_dir: str):
|
||||||
title = 'Tedious Tome'
|
title = 'Tedious Tome'
|
||||||
image_url = 'https://bookwyrm.instance/images/previews/covers/1234.jpg'
|
image_url = 'https://bookwyrm.instance/images/previews/covers/1234.jpg'
|
||||||
book_url = 'https://bookwyrm.instance/book/56789'
|
book_url = 'https://bookwyrm.instance/book/56789'
|
||||||
content = 'xyz wants to read <a href="' + book_url + \
|
content = '<p>xyz wants to read <a href="' + book_url + \
|
||||||
'"><i>' + title + '</i></a>'
|
'"><i>' + title + '</i></a></p>'
|
||||||
actor = 'https://bookwyrm.instance/user/xyz'
|
actor = 'https://bookwyrm.instance/user/xyz'
|
||||||
id_str = actor + '/generatednote/63472854'
|
id_str = actor + '/generatednote/63472854'
|
||||||
published = '2024-01-01T10:30:00.2+00:00'
|
published = '2024-01-01T10:30:00.2+00:00'
|
||||||
|
|
Loading…
Reference in New Issue