Пример #1
0
def test_create(session):
    from dispatch.incident_type.service import create
    from dispatch.incident_type.models import IncidentTypeCreate

    name = "XXX"

    incident_type_in = IncidentTypeCreate(name=name)
    incident_type = create(db_session=session, incident_type_in=incident_type_in)
    assert incident_type
Пример #2
0
def test_create(session, project, document):
    from dispatch.incident_type.service import create
    from dispatch.incident_type.models import IncidentTypeCreate

    name = "XXX"

    incident_type_in = IncidentTypeCreate(
        name=name,
        template_document=document,
        project=project,
    )

    incident_type = create(db_session=session, incident_type_in=incident_type_in)
    assert incident_type