|
@@ 256-270 (lines=15) @@
|
| 253 |
|
_, redeploy = evc.update(**update_dict) |
| 254 |
|
assert redeploy |
| 255 |
|
|
| 256 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 257 |
|
def test_update_queue_null(self, _sync_mock): |
| 258 |
|
"""Test if evc is set to redeploy.""" |
| 259 |
|
attributes = { |
| 260 |
|
"controller": get_controller_mock(), |
| 261 |
|
"name": "circuit_name", |
| 262 |
|
"enable": True, |
| 263 |
|
"dynamic_backup_path": True, |
| 264 |
|
"uni_a": get_uni_mocked(is_valid=True), |
| 265 |
|
"uni_z": get_uni_mocked(is_valid=True), |
| 266 |
|
} |
| 267 |
|
update_dict = {"queue_id": None} |
| 268 |
|
evc = EVC(**attributes) |
| 269 |
|
_, redeploy = evc.update(**update_dict) |
| 270 |
|
assert redeploy |
| 271 |
|
|
| 272 |
|
def test_update_different_tag_lists(self): |
| 273 |
|
"""Test update when tag lists are different.""" |
|
@@ 240-254 (lines=15) @@
|
| 237 |
|
assert evc.primary_path == primary_path |
| 238 |
|
assert len(evc.backup_path) == 0 |
| 239 |
|
|
| 240 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 241 |
|
def test_update_queue(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": 3} |
| 252 |
|
evc = EVC(**attributes) |
| 253 |
|
_, redeploy = evc.update(**update_dict) |
| 254 |
|
assert redeploy |
| 255 |
|
|
| 256 |
|
@patch("napps.kytos.mef_eline.models.EVC.sync") |
| 257 |
|
def test_update_queue_null(self, _sync_mock): |