Exemplo n.º 1
0
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
Exemplo n.º 2
0
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"
Exemplo n.º 3
0
def test_apm_host_when_the_apm_setting_is_missing():
    s = SettingsData(1, {
        "settings": [],
    })
    assert s.apm_host() is None