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