Exemplo n.º 1
0
def test_config_route_when_it_is_empty():
    s = SettingsData(1, {"config_route": ""})
    assert s.config_route("http://example.com") == (
        "http://example.com/2020-06-18/config/1/config.json")
Exemplo n.º 2
0
def test_config_route_when_it_is_specified():
    s = SettingsData(1, {"config_route": "123/cfg/321/cfg.json"})
    assert s.config_route("http://example.com") == (
        "http://example.com/123/cfg/321/cfg.json")
Exemplo n.º 3
0
def test_config_route_when_the_given_host_ends_with_a_trailing_slash():
    s = SettingsData(1, {})
    assert s.config_route("http://example.com/") == (
        "http://example.com/2020-06-18/config/1/config.json")
Exemplo n.º 4
0
def test_config_route_when_missing():
    s = SettingsData(1, {})
    assert s.config_route("http://example.com") == (
        "http://example.com/2020-06-18/config/1/config.json")