snap_test_building_css_files.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  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[
  7. "test_simple_url_to_file_is_replaced_with_valid_url 1"
  8. ] = '.page-header { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }'
  9. snapshots[
  10. "test_relative_url_to_file_is_replaced_with_valid_url 1"
  11. ] = '.page-header { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }'
  12. snapshots[
  13. "test_url_to_file_from_create_react_app_is_replaced_with_valid_url 1"
  14. ] = '.page-header { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }'
  15. snapshots[
  16. "test_quoted_url_to_file_is_replaced_with_valid_url 1"
  17. ] = '.page-header { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }'
  18. snapshots[
  19. "test_single_quoted_url_to_file_is_replaced_with_valid_url 1"
  20. ] = '.page-header { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }'
  21. snapshots[
  22. "test_css_file_with_multiple_different_urls_is_correctly_replaced 1"
  23. ] = """.page-header { background-image: url(http://cdn.example.com/bg.png); }
  24. .container { background-image: url("/media/themes/themedir/media/test.357c2ee3.png"); }
  25. .alert { background-image: url("g"); }"""