| @@ 731-746 (lines=16) @@ | ||
| 728 | deploy_mocked.assert_called_with(evc.primary_path) |
|
| 729 | self.assertTrue(deployed) |
|
| 730 | ||
| 731 | def test_deploy_to_case_3(self): |
|
| 732 | """Test deploy with one link down.""" |
|
| 733 | primary_path = [ |
|
| 734 | get_link_mocked(status=EntityStatus.DOWN), |
|
| 735 | get_link_mocked(status=EntityStatus.UP) |
|
| 736 | ] |
|
| 737 | attributes = { |
|
| 738 | "name": "circuit_name", |
|
| 739 | "uni_a": get_uni_mocked(is_valid=True), |
|
| 740 | "uni_z": get_uni_mocked(is_valid=True), |
|
| 741 | "primary_path": primary_path, |
|
| 742 | "enabled": True |
|
| 743 | } |
|
| 744 | evc = EVC(**attributes) |
|
| 745 | deployed = evc.deploy_to('primary_path', evc.primary_path) |
|
| 746 | self.assertFalse(deployed) |
|
| 747 | ||
| 748 | @patch('napps.kytos.mef_eline.models.log') |
|
| 749 | @patch('napps.kytos.mef_eline.models.EVCDeploy.deploy') |
|
| @@ 105-120 (lines=16) @@ | ||
| 102 | deploy_mocked.assert_called_with(evc.primary_path) |
|
| 103 | self.assertTrue(deployed) |
|
| 104 | ||
| 105 | def test_deploy_to_case_3(self): |
|
| 106 | """Test deploy with one link down.""" |
|
| 107 | primary_path = [ |
|
| 108 | get_link_mocked(status=EntityStatus.DOWN), |
|
| 109 | get_link_mocked(status=EntityStatus.UP) |
|
| 110 | ] |
|
| 111 | attributes = { |
|
| 112 | "name": "circuit_name", |
|
| 113 | "uni_a": get_uni_mocked(is_valid=True), |
|
| 114 | "uni_z": get_uni_mocked(is_valid=True), |
|
| 115 | "primary_path": primary_path, |
|
| 116 | "enabled": True |
|
| 117 | } |
|
| 118 | evc = EVC(**attributes) |
|
| 119 | deployed = evc.deploy_to('primary_path', evc.primary_path) |
|
| 120 | self.assertFalse(deployed) |
|
| 121 | ||
| 122 | @patch('napps.kytos.mef_eline.models.log') |
|
| 123 | @patch('napps.kytos.mef_eline.models.EVCDeploy.deploy') |
|