def assignBeasons(self): # jeudi soir accueil concurrents et distribution transpondeurs beaconNumber = self.startBeaconNumber for pilot in self.allPilots: self.beacons[beaconNumber] = getBeacon(beaconNumber) associatePilotBeacon(pilot['id'], self.beacons[beaconNumber]['id']) pilot['currentBeacon'] = self.beacons[beaconNumber] beaconNumber += 1
event = addEvent('Live tests') chrono = addChronometer('Raspberry-2') cleo = addPilot('Cleo', 'Pipart') fabrice = addPilot('Fabrice', 'Pipart') newbie = addCategory('Newbie') addPilotToCategory(newbie['id'], cleo['id']) garage = addLocation('Garage', True) beacon = addBeacon(1) beacon = addBeacon(2) beacon = addBeacon(3) beacon = addBeacon(4) beacon = addBeacon(5) beacon = addBeacon(6) beacon = addBeacon(7) beacon = addBeacon(8) beacon = addBeacon(9) beacon = addBeacon(10) beacon = addBeacon(175) associatePilotBeacon(fabrice['id'], beacon['id']) beacon = addBeacon(248) associatePilotBeacon(cleo['id'], beacon['id']) start = datetime(2018, 1, 1) end = datetime(2019, 12, 31) session = addSession('Test session', start, end, 'tt') addSessionToLocation(garage['id'], session['id']) addSessionToEvent(event['id'], session['id']) addChronometerToSession(session['id'], chrono['id']) addPilotToSession(session['id'], cleo['id'])
def addJuniorPilot(self, firstname, lastname, beaconNumber): pilot = addPilot(firstname, lastname) self.juniorPilots.append(pilot) self.allPilots.append(pilot) addPilotToCategory(self.juniorCategory['id'], pilot['id']) associatePilotBeacon(pilot['id'], self.beacons[beaconNumber]['id'])