Пример #1
0
def test_remote_api_build_url_with_prefix(prefix, url_path, expected):
    session = RemoteApiSession('http://test.ru', prefix=prefix)
    assert_that(session._build_url(session.url, url_path),
                is_(equal_to(expected)))
Пример #2
0
def test_remote_api_build_url_with_prefix_and_nonorigin_base(
        base, prefix, url_path, expected):
    session = RemoteApiSession(base, prefix=prefix)
    assert_that(session._build_url(session.url, url_path),
                is_(equal_to(expected)))
Пример #3
0
def test_remote_api_build_url():
    session = RemoteApiSession('http://test.ru')
    assert_that(session._build_url(session.url, '/test'),
                is_(equal_to('http://test.ru/test')))