Code Duplication    Length = 13-13 lines in 2 locations

tests/unit/test_main.py 2 locations

@@ 184-196 (lines=13) @@
181
182
        self.assertEqual(json_response, 40)
183
184
    def test_bytes_count_per_flow(self):
185
        """Test bytes_count_per_flow rest call."""
186
        flow_id = "1"
187
        rest_name = "bytes_count/per_flow"
188
        self._patch_switch_flow(flow_id)
189
190
        dpid_id = 111
191
        response = self._get_rest_response(rest_name, dpid_id)
192
193
        json_response = json.loads(response.data)
194
        self.assertEqual(json_response[0]["flow_id"], flow_id)
195
        self.assertEqual(json_response[0]["bytes_counter"], 10)
196
        self.assertEqual(json_response[0]["bits_per_second"], 4.0)
197
198
    def test_bytes_count_sum(self):
199
        """Test bytes_count_sum rest call."""
@@ 158-170 (lines=13) @@
155
        self.assertEqual(json_response["bytes_counter"], 10)
156
        self.assertEqual(json_response["bits_per_second"], 4.0)
157
158
    def test_packet_count_per_flow(self):
159
        """Test packet_count_per_flow rest call."""
160
        flow_id = "1"
161
        rest_name = "packet_count/per_flow"
162
        self._patch_switch_flow(flow_id)
163
164
        dpid_id = 111
165
        response = self._get_rest_response(rest_name, dpid_id)
166
167
        json_response = json.loads(response.data)
168
        self.assertEqual(json_response[0]["flow_id"], flow_id)
169
        self.assertEqual(json_response[0]["packet_counter"], 40)
170
        self.assertEqual(json_response[0]["packet_per_second"], 2.0)
171
172
    def test_packet_count_sum(self):
173
        """Test packet_count_sum rest call."""