snap_test_inline_bbcode.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- coding: utf-8 -*-
  2. # snapshottest: v1 - https://goo.gl/zC4yUc
  3. from __future__ import unicode_literals
  4. from snapshottest import Snapshot
  5. snapshots = Snapshot()
  6. snapshots["test_bold_bbcode 1"] = "<p>Lorem <b>ipsum</b>!</p>"
  7. snapshots["test_italics_bbcode 1"] = "<p>Lorem <i>ipsum</i>!</p>"
  8. snapshots["test_underline_bbcode 1"] = "<p>Lorem <u>ipsum</u>!</p>"
  9. snapshots[
  10. "test_inline_bbcode_can_be_mixed_with_markdown 1"
  11. ] = "<p>Lorem <b><strong>ipsum</strong></b>!</p>"
  12. snapshots[
  13. "test_image_bbcode 1"
  14. ] = '<p>Lorem <img alt="placekitten.com/g/1200/500" src="https://placekitten.com/g/1200/500"/> ipsum</p>'
  15. snapshots[
  16. "test_image_bbcode_is_case_insensitive 1"
  17. ] = '<p>Lorem <img alt="placekitten.com/g/1200/500" src="https://placekitten.com/g/1200/500"/> ipsum</p>'
  18. snapshots[
  19. "test_url_bbcode 1"
  20. ] = '<p>Lorem <a href="https://placekitten.com/g/1200/500" rel="nofollow noopener">placekitten.com/g/1200/500</a> ipsum</p>'
  21. snapshots[
  22. "test_url_bbcode_with_link_text 1"
  23. ] = '<p>Lorem <a href="https://placekitten.com/g/1200/500" rel="nofollow noopener">dolor</a> ipsum</p>'
  24. snapshots[
  25. "test_url_bbcode_with_long_link_text 1"
  26. ] = '<p>Lorem <a href="https://placekitten.com/g/1200/500" rel="nofollow noopener">dolor met</a> ipsum</p>'
  27. snapshots[
  28. "test_url_bbcode_with_quotes_and_link_text 1"
  29. ] = '<p>Lorem <a href="https://placekitten.com/g/1200/500" rel="nofollow noopener">dolor</a> ipsum</p>'
  30. snapshots[
  31. "test_url_bbcode_with_quotes_and_long_link_text 1"
  32. ] = '<p>Lorem <a href="https://placekitten.com/g/1200/500" rel="nofollow noopener">dolor met</a> ipsum</p>'