Esempio n. 1
0
def test_network():
    c, n = network(238, 1)
    assert c == 'DK'
    assert n == 'TDC A/S'

    c, n = network(238, 2)
    assert c == 'DK'
    assert n == 'Telenor Denmark'
def test_network():
    c, n = network(238, 1)
    assert c == 'DK'
    assert n == 'TDC A/S'

    c, n = network(238, 2)
    assert c == 'DK'
    assert n == 'Telenor Denmark'

    c, n = network(425, 6)
    assert c == 'PS'
    assert n == 'Wataniya Palestine Mobile Telecommunications Company'
Esempio n. 3
0
def test_country_networks():
    nets = country_networks('US')
    for n in nets:
        mcc, mnc, name0 = n
        c, name1 = network(mcc, mnc)
        assert c == 'US'
        assert name0 == name1
Esempio n. 4
0
def test_network():
    c, n = network(238, 1)
    assert c == 'DK'
    assert n == 'TDC Mobil'
Esempio n. 5
0
def test_invalid_network():
    with pytest.raises(InvalidNetwork):
        network(0, 0)