Skip to content

Commit

Permalink
Added more unit tests for try_avoid_same_s_vlan
Browse files Browse the repository at this point in the history
  • Loading branch information
Alopalao committed Dec 4, 2024
1 parent 7ef3241 commit 582a743
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,20 @@ async def test_redeploy_evc(self):
)
assert response.status_code == 202, response.data

url = f"{self.base_endpoint}/v2/evc/1/redeploy"
url = url + "?try_avoid_same_s_vlan=false"
response = await self.api_client.patch(url)
evc1.remove_current_flows.assert_called_with(
sync=False, return_path=False
)

url = f"{self.base_endpoint}/v2/evc/1/redeploy"
url = url + "?try_avoid_same_s_vlan=True"
response = await self.api_client.patch(url)
evc1.remove_current_flows.assert_called_with(
sync=False, return_path=True
)

async def test_redeploy_evc_disabled(self):
"""Test endpoint to redeploy an EVC."""
evc1 = MagicMock()
Expand Down

0 comments on commit 582a743

Please sign in to comment.