def test_duplicate_unequal(self): """Tests the duplicate function with unequal positions.""" pos1 = AerialPosition(latitude=0, longitude=0, altitude_msl=0) pos2 = AerialPosition(latitude=1, longitude=1, altitude_msl=0) pos3 = AerialPosition(latitude=0, longitude=0, altitude_msl=1) self.assertFalse(pos1.duplicate(pos2)) self.assertFalse(pos1.duplicate(pos3))
def test_duplicate_equal(self): """Tests the duplicate function with unequal positions.""" gps1 = GpsPosition(latitude=0, longitude=0) gps1.save() gps2 = GpsPosition(latitude=0, longitude=0) gps2.save() pos1 = AerialPosition(gps_position=gps1, altitude_msl=0) pos2 = AerialPosition(gps_position=gps2, altitude_msl=0) pos3 = AerialPosition(gps_position=gps1, altitude_msl=0) self.assertTrue(pos1.duplicate(pos2)) self.assertTrue(pos1.duplicate(pos3))