Пример #1
0
def test_workbench_created_by():
    intset = IntrusionSet(
        name="Breach 123", created_by_ref=constants.IDENTITY_ID,
    )
    save(intset)
    creator = intset.created_by()
    assert creator.id == constants.IDENTITY_ID
Пример #2
0
def test_workbench_get_all_intrusion_sets():
    ins = IntrusionSet(id=INTRUSION_SET_ID, **INTRUSION_SET_KWARGS)
    save(ins)

    resp = intrusion_sets()
    assert len(resp) == 1
    assert resp[0].id == INTRUSION_SET_ID