Code Duplication    Length = 13-13 lines in 2 locations

tests/unit/test_main.py 2 locations

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