def test_track_request_sends_host_data_to_influxdb(
    mocker: MockerFixture,
) -> None:
    """
    Verify that host is part of the data send to influxDB
    """
    # Given
    mock_influxdb = mocker.patch("app_analytics.track.InfluxDBWrapper")
    mock_environment = mocker.MagicMock()

    # When
    track_request_influxdb(
        resource=Resource.FLAGS,
        host="testserver",
        environment=mock_environment,
    )

    # Then
    assert (
        mock_influxdb.return_value.add_data_point.call_args_list[0][1]["tags"]["host"]
        == "testserver"
    )

    Verify that host is part of the data send to influxDB
    
api/tests/unit/app_analytics/test_unit_app_analytics_track.py