コード例 #1
0
def test_stream_count_no_traffic_start_cmd(stc):
    seq_root = ET.fromstring(sequencer_xml_1 + stak_no_traffic + stak_end)

    port_tag_location_dict = {
        "West Port Group": ["10.14.16.27/2/7", "10.14.16.17/2/7"],
        "East Port Group": ["10.14.16.37/2/7", "10.14.16.47/2/8"],
    }

    est_util = SequencerEstimator(root=seq_root)
    est_util.set_port_dict(port_tag_location_dict)
    streamCountEstimate = est_util.estimate_stream_count()
    assert streamCountEstimate["10.14.16.27/2/7"] == 0
    assert streamCountEstimate["10.14.16.17/2/7"] == 0
    assert streamCountEstimate["10.14.16.37/2/7"] == 0
    assert streamCountEstimate["10.14.16.47/2/8"] == 0
コード例 #2
0
def test_stream_count_devicecount(stc):
    seq_root = ET.fromstring(stak_estimation)

    port_tag_location_dict = {
        "West Port Group": ["10.14.16.27/2/7", "10.14.16.17/2/7"],
        "East Port Group": ["10.14.16.37/2/7", "10.14.16.47/2/8"],
    }

    est_util = SequencerEstimator(root=seq_root)
    est_util.set_port_dict(port_tag_location_dict)
    streamCountEstimate = est_util.estimate_stream_count()

    assert streamCountEstimate["10.14.16.27/2/7"] == 10
    assert streamCountEstimate["10.14.16.17/2/7"] == 10
    assert streamCountEstimate["10.14.16.37/2/7"] == 10
    assert streamCountEstimate["10.14.16.47/2/8"] == 10