Code Duplication    Length = 11-12 lines in 2 locations

tests/unit/tracing/test_trace_entries.py 2 locations

@@ 526-537 (lines=12) @@
523
        assert self.trace_entries.in_port == dpid["in_port"]
524
        assert self.trace_entries.timeout == 0.5
525
526
    def test_timeout(self):
527
        """Test different timeout from default."""
528
        timeout = 5
529
        eth = {"dl_vlan": 100}
530
        dpid = {"dpid": "a", "in_port": 1}
531
        switch = {"switch": dpid, "eth": eth, "timeout": timeout}
532
        entries = {"trace": switch}
533
        self.trace_entries.load_entries(entries)
534
        assert self.trace_entries.dl_vlan == eth["dl_vlan"]
535
        assert self.trace_entries.dpid == dpid["dpid"]
536
        assert self.trace_entries.in_port == dpid["in_port"]
537
        assert self.trace_entries.timeout == timeout
538
539
    def test_proto_missing_tp(self):
540
        """Test missing tp when nw_proto is present"""
@@ 514-524 (lines=11) @@
511
        self.trace_entries.load_entries(entries)
512
        assert not self.trace_entries.dl_vlan
513
514
    def test_minimally_correct(self):
515
        """key trace/switch is mandatory"""
516
        eth = {"dl_vlan": 100}
517
        dpid = {"dpid": "a", "in_port": 1}
518
        switch = {"switch": dpid, "eth": eth}
519
        entries = {"trace": switch}
520
        self.trace_entries.load_entries(entries)
521
        assert self.trace_entries.dl_vlan == eth["dl_vlan"]
522
        assert self.trace_entries.dpid == dpid["dpid"]
523
        assert self.trace_entries.in_port == dpid["in_port"]
524
        assert self.trace_entries.timeout == 0.5
525
526
    def test_timeout(self):
527
        """Test different timeout from default."""