def METHOD_NAME(sql_obs, sample_run, session, tmpfile):
    sql_obs.started_event(**sample_run)
    sql_obs.resource_event(tmpfile.name)
    assert session.query(Run).count() == 1
    db_run = session.query(Run).first()
    assert len(db_run.resources) == 1
    res = db_run.resources[0]
    assert res.filename == tmpfile.name
    assert res.md5sum == tmpfile.md5sum
    assert res.content.decode() == tmpfile.content