def test_apm_host_when_the_apm_setting_is_present_without_endpoint(): s = SettingsData(1, { "settings": [{ "name": "apm", "enabled": True, }], }) assert s.apm_host() is None
def test_apm_host_when_the_apm_setting_is_present(): s = SettingsData( 1, { "settings": [{ "name": "apm", "enabled": True, "endpoint": "http://api.example.com", }], }) assert s.apm_host() == "http://api.example.com"
def test_apm_host_when_the_apm_setting_is_missing(): s = SettingsData(1, { "settings": [], }) assert s.apm_host() is None