Ejemplo n.º 1
0
def test_set_allowed_platform_no_changes():
    temp = {
        "duts": {
            "*": {
                "count": 3,
                "allowed_platforms": ["K64F"],
                "application": {"bin": "hex.bin"}
            },
        }
    }
    assert temp == set_allowed_platform(temp, "K64F")
Ejemplo n.º 2
0
def test_set_allowed_platform_normal():
    ret = set_allowed_platform({
        "duts": {
            "*": {
                "count": 3,
                "allowed_platforms": ["K64F"],
                "application": {"bin": "hex.bin"}
            },
            1: {"application": {"bin": "my_hex.bin"}},
            2: {"application": {"bin": "my_hex2.bin"}}
        }
    }, "K66F")
    assert ret['duts']['*']['allowed_platforms'] == ["K66F"]
Ejemplo n.º 3
0
def test_set_allowed_platform_simple():
    ret = set_allowed_platform({"duts": {}}, "K66F")
    assert ret['duts']['*']['allowed_platforms'] == ["K66F"]