示例#1
0
 def test_convert_to_kilo_bits_value(self):
     value = "1000bit"
     expected_value = int(math.ceil(float(1000) / self.base_unit))
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilo(value, self.base_unit)
     )
示例#2
0
 def test_convert_to_kilo_megabytes_value(self):
     value = "1m"
     expected_value = int(math.ceil(float(self.base_unit ** 2 * 8) /
                                    self.base_unit))
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilo(value, self.base_unit)
     )