Skip to content

Commit

Permalink
Fix youtube tag subsitution test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed Dec 20, 2024
1 parent 5210a63 commit edae00c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions app/tests/core_tests/test_tag_substitutions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import textwrap

import pytest
from django.utils.safestring import SafeString, mark_safe

Expand Down Expand Up @@ -131,16 +133,13 @@ def test_no_change_with_no_tag_or_arg_match(content):
assert s == content


EXPECTED_YOUTUBE_EMBED = """<p><div class="embed-responsive embed-responsive-16by9 rounded border-0">
<iframe
src="https://www.youtube-nocookie.com/embed/QCYYhkTlnhQ?disablekb=1&amp;rel=0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen"
class="embed-responsive-item"
loading="lazy"
sandbox="allow-scripts allow-same-origin allow-presentation allow-popups"
></iframe>
</div>
</p>"""
EXPECTED_YOUTUBE_EMBED = textwrap.dedent(
"""\
<p><div class="embed-responsive embed-responsive-16by9 rounded border-0">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" class="embed-responsive-item" loading="lazy" sandbox="allow-scripts allow-same-origin allow-presentation allow-popups" src="https://www.youtube-nocookie.com/embed/QCYYhkTlnhQ?disablekb=1&amp;rel=0"></iframe>
</div>
</p>"""
)


@pytest.mark.parametrize(
Expand Down

0 comments on commit edae00c

Please sign in to comment.