def setUp(self):
     incident1 = Incident(
         incident_time=timezone.now(),
         incident_region=Region.NE.value,
         incident_category=IncidentType.RESCUE_AND_EVACUATION.value,
         incident_status=IncidentStatus.NEW.value)
     incident1.save()
     self.message = Message(incident1.id, incident1.incident_status)
 def setUp(self):
     incident1 = Incident(
         incident_time=timezone.now(),
         incident_region=Region.SE.value,
         incident_category=IncidentType.GAS_LEAK_CONTROL.value,
         incident_status=IncidentStatus.RESOLVED.value)
     incident1.save()
     self.message = Message(incident1.id, incident1.incident_status)
 def setUp(self):
     self.incident_type = IncidentType.GAS_LEAK_CONTROL
     self.region = Region.CS
     incident1 = Incident(incident_time=timezone.now(),
                          incident_region=self.region.value,
                          incident_category=self.incident_type.value,
                          incident_status=IncidentStatus.NEW.value)
     incident1.save()
     self.message_new = Message(incident1.id, IncidentStatus.NEW)
     self.message_resolved = Message(incident1.id, IncidentStatus.RESOLVED)
예제 #4
0
from callcentre.models import Incident

# incident 0
incident = Incident()
incident.caller_name = 'JENNIFER CHOW'
incident.mobile_number = '83425921'
incident.incident_location = 'Jurong East'
incident.incident_region = 'North West'
incident.incident_category = 'Fire Fighting'
incident.incident_type = 'Fire'
incident.incident_description = "There is a big fire"

if incident.incident_category == 'Emergency Ambulance':
    incident.incident_department = 'Singapore Civil Defence Force'
if incident.incident_category == 'Rescue and Evacuation':
    incident.incident_department = 'Singapore Civil Defence Force'
if incident.incident_category == 'Fire Fighting':
    incident.incident_department = 'Singapore Civil Defence Force'
if incident.incident_category == 'Gas Leak Control':
    incident.incident_department = 'Singapore Power'

incident.save()

# incident 1
incident1 = Incident()
incident1.caller_name = 'JACK LEE'
incident1.mobile_number = '83029342'
incident1.incident_location = 'Bukit Panjang'
incident1.incident_region = 'Central Singapore'
incident1.incident_category = 'Rescue and Evacuation'
incident1.incident_type = 'Haze'