コード例 #1
0
class SensorMagnetometroTest(unittest.TestCase):
    def setUp(self):

        self.sensorMagnetometro = SensorMagnetometro(DriverMagnetometroMock())

    def test_getLastInfo_NoNone(self):

        self.assertIsNotNone(self.sensorMagnetometro.getLastInfo())

    def test_getEstado_NoNone(self):

        self.assertIsNotNone(self.sensorMagnetometro.getStatus())

    def test_getAltura(self):

        self.assertEquals(self.sensorMagnetometro.getAnguloCabezaDron(), data["angulo"])
コード例 #2
0
class SensorMagnetometroTest(unittest.TestCase):
    def setUp(self):

        self.sensorMagnetometro = SensorMagnetometro(DriverMagnetometroMock())

    def test_getLastInfo_NoNone(self):

        self.assertIsNotNone(self.sensorMagnetometro.getLastInfo())

    def test_getEstado_NoNone(self):

        self.assertIsNotNone(self.sensorMagnetometro.getStatus())

    def test_getAltura(self):

        self.assertEquals(self.sensorMagnetometro.getAnguloCabezaDron(),
                          data['angulo'])
コード例 #3
0
    def setUp(self):

        self.sensorMagnetometro = SensorMagnetometro(DriverMagnetometroMock())
コード例 #4
0
    def setUp(self):

        self.sensorMagnetometro = SensorMagnetometro(DriverMagnetometroMock())