1
Fork 0
This repository has been archived on 2024-07-16. You can view files and clone it, but cannot push or open issues or pull requests.
wagtail-draftail-snippet/tests/fixtures.py

18 lines
336 B
Python
Raw Normal View History

2020-02-13 12:23:35 +00:00
import pytest
2020-02-15 03:23:14 +00:00
from wagtail.core.models import Site
from tests.testapp import factories
2020-02-13 12:23:35 +00:00
@pytest.fixture
def site():
site = Site.objects.get(is_default_site=True)
return site
2020-02-15 03:23:14 +00:00
@pytest.fixture()
def advert():
advert = factories.AdvertFactory(text="advert", url="https://www.example.com")
advert.save()
yield advert