Beispiel #1
0
 def test_convert_to_kilobits_bits_value(self):
     value = "1000bit"
     expected_value = utils.bits_to_kilobits(1000, self.base_unit)
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #2
0
 def test_convert_to_kilobits_bytes_value(self):
     value = "1000b"
     expected_value = 8  # kbit
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #3
0
 def test_convert_to_kilobits_bits_value(self):
     value = "1000bit"
     expected_value = tc_lib.bits_to_kilobits(1000, self.base_unit)
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #4
0
 def test_convert_to_kilobits_bytes_value(self):
     value = "1000b"
     expected_value = 8  # kbit
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #5
0
 def test_convert_to_kilobits_megabytes_value(self):
     value = "1m"
     expected_value = utils.bits_to_kilobits(
         self.base_unit ** 2 * 8, self.base_unit)
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #6
0
 def test_convert_to_kilobits_megabits_value(self):
     value = "1mbit"
     expected_value = tc_lib.bits_to_kilobits(
         self.base_unit ** 2, self.base_unit)
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )
Beispiel #7
0
 def test_convert_to_kilobits_megabytes_value(self):
     value = "1m"
     expected_value = utils.bits_to_kilobits(
         self.base_unit ** 2 * 8, self.base_unit)
     self.assertEqual(
         expected_value,
         tc_lib.convert_to_kilobits(value, self.base_unit)
     )