Exemplo n.º 1
0
 def test_decode_field_array_value(self):
     value = decode.field_array(self.FIELD_ARR)[1]
     for position in range(0, len(value)):
         if isinstance(value[position], float):
             self.assertAlmostEqual(round(value[position], 3),
                                    round(self.FIELD_ARR_VALUE[position],
                                          3))
         else:
             self.assertEqual(value[position],
                              self.FIELD_ARR_VALUE[position])
Exemplo n.º 2
0
 def test_decode_field_array_data_type(self):
     self.assertIsInstance(decode.field_array(self.FIELD_ARR)[1], list)
Exemplo n.º 3
0
 def test_decode_field_array_bytes_consumed(self):
     self.assertEqual(decode.field_array(self.FIELD_ARR)[0],
                      len(self.FIELD_ARR))