@@ 294-326 (lines=33) @@ | ||
291 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
292 | assert not result |
|
293 | ||
294 | def test_compare_endpoints6(self): |
|
295 | """Test for compare endpoinst for the fifth internal conditional.""" |
|
296 | endpoint1 = { |
|
297 | "dpid": "00:00:00:00:00:00:00:01", |
|
298 | "in_port": 3, |
|
299 | "out_port": 2, |
|
300 | "out_vlan": 200, |
|
301 | } |
|
302 | endpoint2 = { |
|
303 | "dpid": "00:00:00:00:00:00:00:01", |
|
304 | "in_port": 2, |
|
305 | "out_port": 3, |
|
306 | } |
|
307 | ||
308 | # Test endpoint1 with out_vlan and endpoint2 without in_vlan |
|
309 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
310 | assert not result |
|
311 | ||
312 | endpoint1 = { |
|
313 | "dpid": "00:00:00:00:00:00:00:01", |
|
314 | "in_port": 3, |
|
315 | "out_port": 2, |
|
316 | } |
|
317 | endpoint2 = { |
|
318 | "dpid": "00:00:00:00:00:00:00:01", |
|
319 | "in_port": 2, |
|
320 | "out_port": 3, |
|
321 | "in_vlan": 100, |
|
322 | } |
|
323 | ||
324 | # Test endpoint1 without out_vlan and endpoint2 with in_vlan |
|
325 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
326 | assert not result |
|
327 | ||
328 | def test_compare_endpoints(self): |
|
329 | """Test for compare endpoinst for the fifth internal conditional.""" |
|
@@ 241-273 (lines=33) @@ | ||
238 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
239 | assert not result |
|
240 | ||
241 | def test_compare_endpoints4(self): |
|
242 | """Test for compare endpoinst for the first internal conditional.""" |
|
243 | endpoint1 = { |
|
244 | "dpid": "00:00:00:00:00:00:00:03", |
|
245 | "in_port": 3, |
|
246 | "out_port": 2, |
|
247 | "in_vlan": 100, |
|
248 | } |
|
249 | endpoint2 = { |
|
250 | "dpid": "00:00:00:00:00:00:00:03", |
|
251 | "in_port": 2, |
|
252 | "out_port": 3, |
|
253 | } |
|
254 | ||
255 | # Test endpoint1 with in_vlan and endpoint2 without out_vlan |
|
256 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
257 | assert not result |
|
258 | ||
259 | endpoint1 = { |
|
260 | "dpid": "00:00:00:00:00:00:00:03", |
|
261 | "in_port": 3, |
|
262 | "out_port": 2, |
|
263 | } |
|
264 | endpoint2 = { |
|
265 | "dpid": "00:00:00:00:00:00:00:03", |
|
266 | "in_port": 2, |
|
267 | "out_port": 3, |
|
268 | "out_vlan": 200, |
|
269 | } |
|
270 | ||
271 | # Test endpoint1 without in_vlan and endpoint2 with out_vlan |
|
272 | result = utils._compare_endpoints(endpoint1, endpoint2) |
|
273 | assert not result |
|
274 | ||
275 | def test_compare_endpoints5(self): |
|
276 | """Test for compare endpoinst for the fifth internal conditional.""" |