Code Duplication    Length = 13-13 lines in 2 locations

tests/unit/test_main.py 2 locations

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