How to use the peeringdb.util.split_ref function in peeringdb

To help you get started, we’ve selected a few peeringdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref_exc():
    with pytest.raises(ValueError):
        util.split_ref('asdf123a')
    with pytest.raises(ValueError):
        util.split_ref('123asdf')
github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref():
    assert ('net', 20) == util.split_ref('net20')
    assert ('net', 20) == util.split_ref('NET20')
    assert ('net', 20) == util.split_ref('net 20')
    assert ('net', 20) == util.split_ref('net-20')
github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref():
    assert ('net', 20) == util.split_ref('net20')
    assert ('net', 20) == util.split_ref('NET20')
    assert ('net', 20) == util.split_ref('net 20')
    assert ('net', 20) == util.split_ref('net-20')
github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref():
    assert ('net', 20) == util.split_ref('net20')
    assert ('net', 20) == util.split_ref('NET20')
    assert ('net', 20) == util.split_ref('net 20')
    assert ('net', 20) == util.split_ref('net-20')
github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref():
    assert ('net', 20) == util.split_ref('net20')
    assert ('net', 20) == util.split_ref('NET20')
    assert ('net', 20) == util.split_ref('net 20')
    assert ('net', 20) == util.split_ref('net-20')
github peeringdb / peeringdb-py / tests / test_util.py View on Github external
def test_split_ref_exc():
    with pytest.raises(ValueError):
        util.split_ref('asdf123a')
    with pytest.raises(ValueError):
        util.split_ref('123asdf')