class SensorGPSTest(unittest.TestCase): def setUp(self): self.sensorGPS = SensorGPS(DriverGPSMock()) def test_getLastInfo_NoNone(self): self.assertIsNotNone(self.sensorGPS.getLastInfo()) def test_getEstado_NoNone(self): self.assertIsNotNone(self.sensorGPS.getStatus()) def test_getCoordenadas_NoNone(self): self.assertIsNotNone(self.sensorGPS.getCoordenadas()) def test_getCoordenadas(self): sensorGPS = self.sensorGPS esperado = (data['latitud'], data['longitud'], data['altitud']) self.assertEquals(sensorGPS.getCoordenadas(), esperado)
def setUp(self): self.sensorGPS = SensorGPS(DriverGPSMock())