"""Unit tests for newrelic utility functions.""" from unittest import mock import newrelic.agent from analytics.utils.newrelic import track_custom_parameters def test_track_custom_parameters(): """Test sending of custom parameters to New Relic.""" account_id = '123456' mock_data = { 'account_id': account_id } newrelic.agent.add_custom_parameter = mock.Mock() track_custom_parameters(**mock_data) newrelic.agent.add_custom_parameter.assert_called_with( 'account_id', account_id)