Exemplo n.º 1
0
def test_parse_gist_url_without_user_and_file():
    assert parse_gist_url(
        'https://gist.github.com/17a6dfcb530d53d0b155706b8d657772#') == dict(
            gist_id='17a6dfcb530d53d0b155706b8d657772')
    assert parse_gist_url(
        'https://gist.github.com/17a6dfcb530d53d0b155706b8d657772') == dict(
            gist_id='17a6dfcb530d53d0b155706b8d657772')
Exemplo n.º 2
0
def test_parse_gist_url_fullurl_without_file():
    assert parse_gist_url(
        'https://gist.github.com/Cologler/17a6dfcb530d53d0b155706b8d657772#'
    ) == dict(user='******', gist_id='17a6dfcb530d53d0b155706b8d657772')
    assert parse_gist_url(
        'https://gist.github.com/Cologler/17a6dfcb530d53d0b155706b8d657772'
    ) == dict(user='******', gist_id='17a6dfcb530d53d0b155706b8d657772')
Exemplo n.º 3
0
def test_parse_gist_url_only_gist_id_without_file():
    assert parse_gist_url('17a6dfcb530d53d0b155706b8d657772#') == dict(
        gist_id='17a6dfcb530d53d0b155706b8d657772')
    assert parse_gist_url('17a6dfcb530d53d0b155706b8d657772') == dict(
        gist_id='17a6dfcb530d53d0b155706b8d657772')
Exemplo n.º 4
0
def test_parse_gist_url_only_gist_id():
    assert parse_gist_url(
        '17a6dfcb530d53d0b155706b8d657772#file-python-travis-yml') == dict(
            gist_id='17a6dfcb530d53d0b155706b8d657772',
            file='file-python-travis-yml')
Exemplo n.º 5
0
def test_parse_gist_url_without_user():
    assert parse_gist_url(
        'https://gist.github.com/17a6dfcb530d53d0b155706b8d657772#file-python-travis-yml'
    ) == dict(gist_id='17a6dfcb530d53d0b155706b8d657772',
              file='file-python-travis-yml')
Exemplo n.º 6
0
def test_parse_gist_url_fullurl():
    assert parse_gist_url(
        'https://gist.github.com/Cologler/17a6dfcb530d53d0b155706b8d657772#file-python-travis-yml'
    ) == dict(user='******',
              gist_id='17a6dfcb530d53d0b155706b8d657772',
              file='file-python-travis-yml')