def test_mongo_observer_artifact_event_metadata(mongo_obs, sample_run):
    """Test that the detected content-type is added to other metadata."""
    mongo_obs.started_event(**sample_run)

    filename = "setup.py"
    name = "mysetup"

    mongo_obs.artifact_event(name, filename, metadata={"comment": "the setup file"})
    mongo_obs.join()

    file = mongo_obs.fs.find_one({})
    assert file.metadata["comment"] == "the setup file"

    db_run = mongo_obs.runs.find_one()
    assert db_run["artifacts"]
Test that the detected content-type is added to other metadata.
tests/test_observers/test_queue_mongo_observer.py