|
@@ 240-254 (lines=15) @@
|
| 237 |
|
_, redeploy = evc.update(**update_dict) |
| 238 |
|
assert redeploy |
| 239 |
|
|
| 240 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 241 |
|
def test_update_queue_null(self, _sync_mock): |
| 242 |
|
"""Test if evc is set to redeploy.""" |
| 243 |
|
attributes = { |
| 244 |
|
"controller": get_controller_mock(), |
| 245 |
|
"name": "circuit_name", |
| 246 |
|
"enable": True, |
| 247 |
|
"dynamic_backup_path": True, |
| 248 |
|
"uni_a": get_uni_mocked(is_valid=True), |
| 249 |
|
"uni_z": get_uni_mocked(is_valid=True), |
| 250 |
|
} |
| 251 |
|
update_dict = {"queue_id": None} |
| 252 |
|
evc = EVC(**attributes) |
| 253 |
|
_, redeploy = evc.update(**update_dict) |
| 254 |
|
assert redeploy |
| 255 |
|
|
| 256 |
|
def test_circuit_representation(self): |
| 257 |
|
"""Test the method __repr__.""" |
|
@@ 224-238 (lines=15) @@
|
| 221 |
|
assert evc.primary_path == primary_path |
| 222 |
|
assert len(evc.backup_path) == 0 |
| 223 |
|
|
| 224 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 225 |
|
def test_update_queue(self, _sync_mock): |
| 226 |
|
"""Test if evc is set to redeploy.""" |
| 227 |
|
attributes = { |
| 228 |
|
"controller": get_controller_mock(), |
| 229 |
|
"name": "circuit_name", |
| 230 |
|
"enable": True, |
| 231 |
|
"dynamic_backup_path": True, |
| 232 |
|
"uni_a": get_uni_mocked(is_valid=True), |
| 233 |
|
"uni_z": get_uni_mocked(is_valid=True), |
| 234 |
|
} |
| 235 |
|
update_dict = {"queue_id": 3} |
| 236 |
|
evc = EVC(**attributes) |
| 237 |
|
_, redeploy = evc.update(**update_dict) |
| 238 |
|
assert redeploy |
| 239 |
|
|
| 240 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 241 |
|
def test_update_queue_null(self, _sync_mock): |