conftest.py 818 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import pytest
  2. from .models import Icon
  3. @pytest.fixture
  4. def favicon(db):
  5. return Icon.objects.create(
  6. type=Icon.TYPE_FAVICON, image="static/favicon.png", size=1, width=48, height=48
  7. )
  8. @pytest.fixture
  9. def favicon_32(db):
  10. return Icon.objects.create(
  11. type=Icon.TYPE_FAVICON_32,
  12. image="static/favicon-32.png",
  13. size=1,
  14. width=32,
  15. height=32,
  16. )
  17. @pytest.fixture
  18. def favicon_16(db):
  19. return Icon.objects.create(
  20. type=Icon.TYPE_FAVICON_16,
  21. image="static/favicon-16.png",
  22. size=1,
  23. width=16,
  24. height=16,
  25. )
  26. @pytest.fixture
  27. def apple_touch_icon(db):
  28. return Icon.objects.create(
  29. type=Icon.TYPE_APPLE_TOUCH_ICON,
  30. image="static/test.png",
  31. size=1,
  32. width=180,
  33. height=180,
  34. )