def test_get_magpie_url_returns_value_from_configuration():
    config = {'MAGPIE_API_URL': 'https://magpie.inspirehep.net'}

    with patch.dict(current_app.config, config):
        expected = 'https://magpie.inspirehep.net/predict'
        result = get_magpie_url()

        assert expected == result
示例#2
0
def test_get_magpie_url_returns_value_from_configuration():
    config = {'MAGPIE_API_URL': 'https://magpie.inspirehep.net'}

    with patch.dict(current_app.config, config):
        expected = 'https://magpie.inspirehep.net/predict'
        result = get_magpie_url()

        assert expected == result
示例#3
0
def test_get_magpie_url_returns_none_when_not_in_configuration():
    config = {}

    with patch.dict(current_app.config, config, clear=True):
        assert get_magpie_url() is None
def test_get_magpie_url_returns_none_when_not_in_configuration():
    assert get_magpie_url() is None
def test_get_magpie_url_returns_value_from_configuration():
    expected = 'https://magpie.inspirehep.net/predict'
    result = get_magpie_url()

    assert expected == result
def test_get_magpie_url_returns_none_when_not_in_configuration():
    assert get_magpie_url() is None
def test_get_magpie_url_returns_value_from_configuration():
    expected = 'https://magpie.inspirehep.net/predict'
    result = get_magpie_url()

    assert expected == result
def test_get_magpie_url_returns_none_when_not_in_configuration():
    config = {}

    with patch.dict(current_app.config, config, clear=True):
        assert get_magpie_url() is None