def test_conference_get_by_incident_id(session, conference):
    from dispatch.conference.service import get_by_incident_id

    test_conference = get_by_incident_id(db_session=session, incident_id=conference.incident.id)

    assert test_conference.incident.id == conference.incident.id
    assert test_conference.conference_challenge == conference.conference_challenge
Ejemplo n.º 2
0
def delete_conference(incident: Incident, db_session: SessionLocal):
    """Deletes the conference."""
    conference = conference_service.get_by_incident_id(db_session=db_session,
                                                       incident_id=incident.id)
    p = plugins.get(INCIDENT_PLUGIN_CONFERENCE_SLUG)
    p.delete(conference.conference_id)

    event_service.log(
        db_session=db_session,
        source=p.title,
        description="Incident conference deleted",
        incident_id=incident.id,
    )
Ejemplo n.º 3
0
def delete_conference(incident: Incident, db_session: SessionLocal):
    """Deletes the conference."""
    conference = conference_service.get_by_incident_id(
        db_session=db_session, incident_id=incident.id
    )
    plugin = plugin_service.get_active(db_session=db_session, plugin_type="conference")
    plugin.instance.delete(conference.conference_id)

    event_service.log(
        db_session=db_session,
        source=plugin.title,
        description="Incident conference deleted",
        incident_id=incident.id,
    )