示例#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'
示例#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"