Skip to content

Commit

Permalink
Test hop bitterness with wet hops
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgilmerproj committed Sep 23, 2017
1 parent aeeb54d commit 96b6641
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_utilities_hops.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import unittest

from brew.constants import HOP_TYPE_WHOLE_WET
from brew.constants import IMPERIAL_UNITS
from brew.constants import SI_UNITS
from brew.hops import HopAddition
Expand Down Expand Up @@ -90,6 +91,19 @@ def test_get_ibus(self):
self.final_volume)
self.assertEquals(round(ibu, 2), 39.18)

def test_get_ibus_whole_wet(self):
# Whole Dry Weight is 1.1 times more than pellet weight
# Whole Wet Weight is 5.5 times more than dry weight
weight = 0.57 * 1.1 * 5.5
hop_addition = HopAddition(self.hop,
boil_time=self.boil_time,
weight=weight,
hop_type=HOP_TYPE_WHOLE_WET,
utilization_cls=self.utilization_cls)
ibu = hop_addition.get_ibus(self.sg,
self.final_volume)
self.assertEquals(round(ibu, 2), 39.18)

def test_get_percent_utilization(self):
utilization = self.hop_addition.utilization_cls.get_percent_utilization( # noqa
self.sg, self.boil_time)
Expand Down Expand Up @@ -173,6 +187,19 @@ def test_get_ibus(self):
self.final_volume)
self.assertEquals(round(ibu, 2), 28.52)

def test_get_ibus_whole_wet(self):
# Whole Dry Weight is 1.1 times more than pellet weight
# Whole Wet Weight is 5.5 times more than dry weight
weight = 0.57 * 1.1 * 5.5
hop_addition = HopAddition(self.hop,
boil_time=self.boil_time,
weight=weight,
hop_type=HOP_TYPE_WHOLE_WET,
utilization_cls=self.utilization_cls)
ibu = hop_addition.get_ibus(self.sg,
self.final_volume)
self.assertEquals(round(ibu, 2), 28.52)

def test_get_bigness_factor(self):
bf = self.hop_addition.utilization_cls.get_bigness_factor(self.sg)
self.assertEquals(round(bf, 2), 0.99)
Expand Down

0 comments on commit 96b6641

Please sign in to comment.