|
@@ 265-279 (lines=15) @@
|
| 262 |
|
_, redeploy = evc.update(**update_dict) |
| 263 |
|
self.assertTrue(redeploy) |
| 264 |
|
|
| 265 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 266 |
|
def test_update_queue_null(self, _sync_mock): |
| 267 |
|
"""Test if evc is set to redeploy.""" |
| 268 |
|
attributes = { |
| 269 |
|
"controller": get_controller_mock(), |
| 270 |
|
"name": "circuit_name", |
| 271 |
|
"enable": True, |
| 272 |
|
"dynamic_backup_path": True, |
| 273 |
|
"uni_a": get_uni_mocked(is_valid=True), |
| 274 |
|
"uni_z": get_uni_mocked(is_valid=True), |
| 275 |
|
} |
| 276 |
|
update_dict = {"queue_id": None} |
| 277 |
|
evc = EVC(**attributes) |
| 278 |
|
_, redeploy = evc.update(**update_dict) |
| 279 |
|
self.assertTrue(redeploy) |
| 280 |
|
|
| 281 |
|
def test_circuit_representation(self): |
| 282 |
|
"""Test the method __repr__.""" |
|
@@ 249-263 (lines=15) @@
|
| 246 |
|
self.assertEqual(evc.primary_path, primary_path) |
| 247 |
|
self.assertEqual(len(evc.backup_path), 0) |
| 248 |
|
|
| 249 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 250 |
|
def test_update_queue(self, _sync_mock): |
| 251 |
|
"""Test if evc is set to redeploy.""" |
| 252 |
|
attributes = { |
| 253 |
|
"controller": get_controller_mock(), |
| 254 |
|
"name": "circuit_name", |
| 255 |
|
"enable": True, |
| 256 |
|
"dynamic_backup_path": True, |
| 257 |
|
"uni_a": get_uni_mocked(is_valid=True), |
| 258 |
|
"uni_z": get_uni_mocked(is_valid=True), |
| 259 |
|
} |
| 260 |
|
update_dict = {"queue_id": 3} |
| 261 |
|
evc = EVC(**attributes) |
| 262 |
|
_, redeploy = evc.update(**update_dict) |
| 263 |
|
self.assertTrue(redeploy) |
| 264 |
|
|
| 265 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 266 |
|
def test_update_queue_null(self, _sync_mock): |