Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
1d802915
Commit
1d802915
authored
Aug 18, 2021
by
Georg Krause
Browse files
Fix test cases
parent
2173a592
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/tests/audio/test_serializers.py
View file @
1d802915
...
...
@@ -684,8 +684,8 @@ def test_rss_feed_item_serializer_create(factories):
)
assert
upload
.
track
.
get_tags
()
==
[
"pop"
,
"rock"
]
assert
upload
.
track
.
attachment_cover
.
url
==
"https://image.url/"
assert
upload
.
track
.
description
.
text
==
"
<p>
Html content
</p>
"
assert
upload
.
track
.
description
.
content_type
==
"text/
html
"
assert
upload
.
track
.
description
.
text
==
"Html content"
assert
upload
.
track
.
description
.
content_type
==
"text/
plain
"
def
test_rss_feed_item_serializer_update
(
factories
):
...
...
@@ -754,8 +754,8 @@ def test_rss_feed_item_serializer_update(factories):
)
assert
upload
.
track
.
get_tags
()
==
[
"pop"
,
"rock"
]
assert
upload
.
track
.
attachment_cover
.
url
==
"https://image.url/"
assert
upload
.
track
.
description
.
text
==
"
<p>
Html content
</p>
"
assert
upload
.
track
.
description
.
content_type
==
"text/
html
"
assert
upload
.
track
.
description
.
text
==
"Html content"
assert
upload
.
track
.
description
.
content_type
==
"text/
plain
"
def
test_get_channel_from_rss_url
(
db
,
r_mock
,
mocker
):
...
...
api/tests/common/test_utils.py
View file @
1d802915
...
...
@@ -114,7 +114,7 @@ def test_join_url(start, end, expected):
"<strong>hello world</strong>"
,
),
# images and other non whitelisted html should be removed
(
"hello world
\n
"
,
"text/markdown"
,
False
,
"<p>hello world</p>"
),
(
"hello world
\n
"
,
"text/markdown"
,
False
,
"<p>hello world<
br><
/p>"
),
(
"hello world
\n\n
<script></script>
\n\n
<style></style>"
,
"text/markdown"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment