Esempio n. 1
0
def test_mk_alloc_id_strings():
    with pytest.raises(AssertionError):
        output = platform.mk_alloc_id("test", "test", "test")
Esempio n. 2
0
def test_mk_alloc_id_no_args():
    with pytest.raises(TypeError):
        output = platform.mk_alloc_id()
Esempio n. 3
0
def test_mk_alloc_id_random_args():
    output = platform.mk_alloc_id("test", 100, 2)
    assert output == 1636
Esempio n. 4
0
def test_mk_alloc_id_default_value():
    output = platform.mk_alloc_id(0, 100)
    assert output == 1124
Esempio n. 5
0
def test_mk_alloc_id_both_max():
    output = platform.mk_alloc_id(0, 127, 4)
    assert output == 2175
Esempio n. 6
0
def test_mk_alloc_id_both_args_negative():
    with pytest.raises(AssertionError):
        output = platform.mk_alloc_id(0, -1, -1)
Esempio n. 7
0
def test_mk_alloc_id_idx_idx_too_big():
    with pytest.raises(AssertionError):
        output = platform.mk_alloc_id(0, 0, 5)
Esempio n. 8
0
def test_mk_alloc_id_onu_id_too_big():
    with pytest.raises(AssertionError):
        output = platform.mk_alloc_id(0, 128, 0)
Esempio n. 9
0
def test_mk_alloc_id_all_zeros():
    output = platform.mk_alloc_id(0, 0, 0)
    assert output == 1024