Esempio n. 1
0
def test_url():
    command = Command('method', ['path'], {})
    url = command.url('host')
    assert url == 'coaps://host:5684/path'

    command2 = Command('method', ['path1', 'path2'], {})
    url = command2.url('host')
    assert url == 'coaps://host:5684/path1/path2'
Esempio n. 2
0
def test_url():
    command = Command("method", ["path"], {})
    url = command.url("host")
    assert url == "coaps://host:5684/path"

    command2 = Command("method", ["path1", "path2"], {})
    url = command2.url("host")
    assert url == "coaps://host:5684/path1/path2"