示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 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)
示例#7
0
 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)
示例#8
0
 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)
示例#9
0
 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)
示例#10
0
 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)