def test_get_sugar_conversion_all_sg(self): out = get_sugar_conversion(None, None, self.sg, None) expected = u'SG\tPlato\tBrix\n1.092\t22.0\t22.0' self.assertEquals(out, expected)
def test_get_sugar_conversion_sg_to_plato(self): out = get_sugar_conversion(None, None, self.sg, u'p') self.assertEquals(round(out, 1), self.plato)
def test_get_sugar_conversion_sg_to_sg(self): out = get_sugar_conversion(None, None, self.sg, u's') self.assertEquals(round(out, 3), self.sg)
def test_get_sugar_conversion_brix_to_plato(self): out = get_sugar_conversion(self.brix, None, None, u'p') self.assertEquals(round(out, 1), self.plato)
def test_get_sugar_conversion_sg_to_brix(self): out = get_sugar_conversion(None, None, self.sg, u'b') self.assertEquals(round(out, 1), self.brix)
def test_get_sugar_conversion_all_sg(self): out = get_sugar_conversion(None, None, self.sg, None) expected = u"SG\tPlato\tBrix\n1.092\t22.0\t22.0" self.assertEquals(out, expected)
def test_get_sugar_conversion_sg_to_sg(self): out = get_sugar_conversion(None, None, self.sg, u"s") self.assertEquals(round(out, 3), self.sg)
def test_get_sugar_conversion_sg_to_plato(self): out = get_sugar_conversion(None, None, self.sg, u"p") self.assertEquals(round(out, 1), self.plato)
def test_get_sugar_conversion_sg_to_brix(self): out = get_sugar_conversion(None, None, self.sg, u"b") self.assertEquals(round(out, 1), self.brix)
def test_get_sugar_conversion_brix_to_plato(self): out = get_sugar_conversion(self.brix, None, None, u"p") self.assertEquals(round(out, 1), self.plato)