mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 15:09:42 +00:00
Update tests for FG/OG
This commit is contained in:
parent
1ff3d6e3a7
commit
7505938acc
2 changed files with 91 additions and 33 deletions
|
|
@ -158,62 +158,118 @@ def auth(client):
|
|||
def sample_recipes():
|
||||
"""These sample recipes are useful for testing filters."""
|
||||
return {
|
||||
'blonde-ale': {
|
||||
'efficiency': '68.00',
|
||||
'lager': {
|
||||
'efficiency': '72',
|
||||
'fermentables': [
|
||||
{
|
||||
'amount': '8.50',
|
||||
'amount': '9.5',
|
||||
'color': '1.80',
|
||||
'name': 'Pale Malt, 2-row (Rahr) (US)',
|
||||
'ppg': '37.00',
|
||||
'type': 'Grain'
|
||||
},
|
||||
{
|
||||
'amount': '0.50',
|
||||
'color': '10.00',
|
||||
'name': 'Munich Malt 10L (Briess) (US)',
|
||||
'ppg': '35.00',
|
||||
'type': 'Grain'
|
||||
'amount': '1',
|
||||
'color': '0',
|
||||
'name': 'Corn Sugar (Dextrose)',
|
||||
'ppg': '46.00',
|
||||
'type': 'Sugar'
|
||||
}
|
||||
],
|
||||
'hops': [
|
||||
{
|
||||
'alpha': '9.30',
|
||||
'amount': '0.50',
|
||||
'duration': '30.00',
|
||||
'name': 'Cascade (US)',
|
||||
'alpha': '7.0',
|
||||
'amount': '1',
|
||||
'duration': '60',
|
||||
'name': 'Cluster (US)',
|
||||
'use': 'Boil'
|
||||
},
|
||||
{
|
||||
'alpha': '9.30',
|
||||
'amount': '0.50',
|
||||
'duration': '15.00',
|
||||
'name': 'Cascade (US)',
|
||||
'alpha': '2.8',
|
||||
'amount': '1',
|
||||
'duration': '10.00',
|
||||
'name': 'Saaz (CZ)',
|
||||
'use': 'Boil'
|
||||
},
|
||||
{
|
||||
'alpha': '9.30',
|
||||
'amount': '1.00',
|
||||
'duration': '5.00',
|
||||
'name': 'Cascade (US)',
|
||||
'use': 'Boil'
|
||||
'alpha': '2.8',
|
||||
'amount': '1.0',
|
||||
'duration': '5',
|
||||
'name': 'Saaz (CZ)',
|
||||
'use': 'Dry-Hop'
|
||||
}
|
||||
],
|
||||
'name': 'Blonde Ale Base',
|
||||
'notes': "This is a base recipe. It's okay on its own, but"
|
||||
'better with other things, like fruits.',
|
||||
'name': 'Lager',
|
||||
'notes': 'Test simple dry-hopped lager w/ sugar',
|
||||
'volume': '5.50',
|
||||
'yeast': {
|
||||
'abv_tolerance': '15.00',
|
||||
'code': 'WLP090',
|
||||
'flocculation': 'High',
|
||||
'high_attenuation': '83.00',
|
||||
'code': 'WLP940',
|
||||
'flocculation': 'Medium',
|
||||
'high_attenuation': '78.00',
|
||||
'lab': 'White Labs',
|
||||
'low_attenuation': '76.00',
|
||||
'max_temperature': '68.00',
|
||||
'min_temperature': '65.00',
|
||||
'name': 'San Diego Super Yeast',
|
||||
'low_attenuation': '70.00',
|
||||
'max_temperature': '55.00',
|
||||
'min_temperature': '50.00',
|
||||
'name': 'Mexican Lager',
|
||||
'type': 'Liquid'
|
||||
}
|
||||
},
|
||||
'sweetstout': {
|
||||
'efficiency': '72',
|
||||
'fermentables': [
|
||||
{
|
||||
'amount': '2.75',
|
||||
'color': '3',
|
||||
'name': 'Pale Malt, 2-row (UK)',
|
||||
'ppg': '36.00',
|
||||
'type': 'Grain'
|
||||
},
|
||||
{
|
||||
'amount': '0.25',
|
||||
'color': '450',
|
||||
'name': 'Chocolate Malt (UK)',
|
||||
'ppg': '34.00',
|
||||
'type': 'Grain'
|
||||
},
|
||||
{
|
||||
'amount': '0.5',
|
||||
'color': '0',
|
||||
'name': 'Lactose',
|
||||
'ppg': '35.00',
|
||||
'type': 'Non-fermentable'
|
||||
}
|
||||
],
|
||||
'hops': [
|
||||
{
|
||||
'alpha': '5.0',
|
||||
'amount': '0.5',
|
||||
'duration': '60',
|
||||
'name': 'East Kent Goldings (UK)',
|
||||
'use': 'Boil'
|
||||
},
|
||||
{
|
||||
'alpha': '5.0',
|
||||
'amount': '0.5',
|
||||
'duration': '10',
|
||||
'name': 'East Kent Goldings (UK)',
|
||||
'use': 'Boil'
|
||||
}
|
||||
],
|
||||
'name': 'Sweet Stout',
|
||||
'notes': 'Test stout w/ Lactose',
|
||||
'volume': '2.5',
|
||||
'yeast': {
|
||||
'abv_tolerance': '12.00',
|
||||
'code': '',
|
||||
'flocculation': 'High',
|
||||
'high_attenuation': '77.00',
|
||||
'lab': 'Danstar',
|
||||
'low_attenuation': '73.00',
|
||||
'max_temperature': '70.00',
|
||||
'min_temperature': '57.00',
|
||||
'name': 'Nottingham',
|
||||
'type': 'Dry'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,10 @@ from humulus.filters import *
|
|||
|
||||
|
||||
def test_recipe_og(sample_recipes):
|
||||
assert recipe_og(sample_recipes['blonde-ale']) == '1.041'
|
||||
assert recipe_og(sample_recipes['lager']) == '1.054'
|
||||
assert recipe_og(sample_recipes['sweetstout']) == '1.038'
|
||||
|
||||
|
||||
def test_recipe_fg(sample_recipes):
|
||||
assert recipe_fg(sample_recipes['blonde-ale']) == '1.008'
|
||||
assert recipe_fg(sample_recipes['lager']) == '1.014'
|
||||
assert recipe_fg(sample_recipes['sweetstout']) == '1.015'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue