def setUp(self): self._to_delete = list() campusLocation = Location.from_code("UCSB", "campus") ref = LocationGenericDao().insert_new(campusLocation) campusLocation.set_firestore_ref(ref) self._to_delete.append(ref) self.event_dict = { "eventCategory": "campus", "campusCode": "UCSB", "isClosed": False, "targets": [{ 'eventCategory': 'campus', 'toEvent': True, 'arriveAtEventTime': { 'earliest': 1545033600, 'latest': 1545119999 } }, { 'eventCategory': 'campus', 'toEvent': False, 'leaveEventTime': { 'earliest': 1545033600, 'latest': 1545119999 } }], "localDateString": "2018-12-17", "pricing": 123456789, "parkingInfo": { "parkingAvailable": False, "parkingPrice": 0, "parkingLocation": "none" }, "description": "UCSB on 2018-12-17", "name": "UCSB", "locationRef": "/locations/testlocationid1", "participants": [] }
def doWorkUc(campusCode="UCSB"): campusLocation = Location.from_code("UCSB", "campus") campusLocation.save() ref = campusLocation.doc_ref campusLocation.set_firestore_ref(ref)
def doWorkUc(campusCode="UCSB"): campusLocation = Location.from_code("UCSB", "campus") ref = LocationGenericDao().insert_new(campusLocation) campusLocation.set_firestore_ref(ref)