示例#1
0
def test_net_with_connectors_too_many():
    baseboard = read_dmidecode._get_baseboard(
        read_file(filedir, "baseboard.txt"))
    baseboard = read_dmidecode._get_connectors(
        read_file(filedir, "connector.txt"), baseboard)

    expect = [{
        "type": "motherboard",
        "working": "yes",
        "brand": "ASUSTeK Computer INC.",
        "model": "P6T DELUXE V2",
        "sn": "723627130020069",
        "ps2-ports-n": 1,
        "usb-ports-n": 7,
        "firewire-ports-n": 3,
        "ide-ports-n": 1,
        "sata-ports-n": 6,
        "mini-jack-ports-n": 7,
        "ethernet-ports-1000m-n": 3,
        "mac": "00:c0:11:fe:fe:11, 00:c0:11:fe:fe:22, 00:c0:11:fe:fe:42",
        "sas-sata-ports-n": 2,
        "notes": "Unknown connector: None / Other (AUDIO / AUDIO)",
    }]
    output = read_dmidecode._get_net(read_file(filedir, "net_too_many.txt"),
                                     baseboard)

    assert output == expect
示例#2
0
def test_net_without_connectors():
    baseboard = read_dmidecode._get_baseboard(
        read_file(filedir, "baseboard.txt"))

    expect = [{
        "type": "motherboard",
        "working": "yes",
        "brand": "ASUSTeK Computer INC.",
        "model": "P6T DELUXE V2",
        "sn": "723627130020069",
        "ethernet-ports-1000m-n": 2,
        "mac": "00:c0:11:fe:fe:11, 00:c0:11:fe:fe:22",
    }]
    output = read_dmidecode._get_net(read_file(filedir, "net.txt"), baseboard)

    assert output == expect