def test_duplicate(sample_data1):
    event_types = sample_data1.query(models.EventType).all()
    assert len(event_types) == 7
    event_type1 = event_types[0]

    hosts = sample_data1.query(models.Host).all()
    assert len(hosts) == 3
    host = hosts[0]

    models.Event.create(
        sample_data1, host, "testman", event_type1, note="This is a test event"
    )
    sample_data1.commit()

    models.Event.create(
        sample_data1, host, "testman", event_type1, note="This is another test event"
    )
    sample_data1.commit()
Test to ensure duplicate events are fine b/c there can be multiple identical events
dataset/ETHPy150Open dropbox/hermes/tests/model_tests/test_events.py/test_duplicate