1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 12:42:41 +00:00

put fixtures into conftest

This commit is contained in:
Bastian Venthur
2021-03-29 11:59:43 +02:00
parent 03663a855d
commit d227392c79
3 changed files with 6 additions and 59 deletions

View File

@@ -1,46 +1,5 @@
import datetime
import pytest
from blag import blag
@pytest.fixture
def environment():
site = {
'base_url': 'site base_url',
'title': 'site title',
'description': 'site description',
'author': 'site author',
}
env = blag.environment_factory(globals_=dict(site=site))
yield env
@pytest.fixture
def page_template(environment):
yield environment.get_template('page.html')
@pytest.fixture
def article_template(environment):
yield environment.get_template('article.html')
@pytest.fixture
def archive_template(environment):
yield environment.get_template('archive.html')
@pytest.fixture
def tags_template(environment):
yield environment.get_template('tags.html')
@pytest.fixture
def tag_template(environment):
yield environment.get_template('tag.html')
def test_page(page_template):
ctx = {