mirror of
https://github.com/shouptech/synthale.git
synced 2026-02-03 15:39:45 +00:00
30 lines
899 B
Python
30 lines
899 B
Python
"""Contains fixtures used during tests."""
|
|
|
|
import pytest
|
|
import pybeerxml
|
|
|
|
from synthale.recipes import MarkdownRecipe
|
|
|
|
|
|
@pytest.fixture
|
|
def xml_recipes():
|
|
"""Generate a list of pybeerxml.Recipe objects."""
|
|
coffeestout = pybeerxml.Parser().parse('tests/recipes/coffee-stout.xml')[0]
|
|
weizen = pybeerxml.Parser().parse('tests/recipes/weizen.xml')[0]
|
|
return [coffeestout, weizen]
|
|
|
|
|
|
@pytest.fixture
|
|
def md_recipes():
|
|
"""Generate a list of MarkdownRecipe objects."""
|
|
coffeestout = pybeerxml.Parser().parse('tests/recipes/coffee-stout.xml')[0]
|
|
weizen = pybeerxml.Parser().parse('tests/recipes/weizen.xml')[0]
|
|
return [MarkdownRecipe(coffeestout), MarkdownRecipe(weizen)]
|
|
|
|
|
|
@pytest.fixture
|
|
def md_weizen():
|
|
"""Return the sample weizen recipe as a MarkdownRecipe object."""
|
|
return MarkdownRecipe(
|
|
pybeerxml.Parser().parse('tests/recipes/weizen.xml')[0]
|
|
)
|