def METHOD_NAME(tag_factory, user_factory):
    tag = tag_factory(names=["dummy"])
    db.session.add(tag)
    db.session.flush()
    with patch("szurubooru.func.snapshots.get_tag_snapshot"), patch(
        "szurubooru.func.snapshots._post_to_webhooks"
    ):
        snapshots.get_tag_snapshot.return_value = "mocked"
        snapshots.delete(tag, user_factory())
    db.session.flush()
    results = db.session.query(model.Snapshot).all()
    assert len(results) == 1
    assert results[0].operation == model.Snapshot.OPERATION_DELETED
    assert results[0].data == "mocked"