Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
loulecrivain committed Feb 27, 2025
1 parent cba6bc0 commit 1190b88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cosmo/routerl2vpnvisitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def isCompliantWANL2VPN(self, o: L2VPNType) -> bool:
terminations = o.getTerminations()
if o.getType().lower() == "vpws" and len(terminations) != self._vpws_authorized_terminations_n:
warnings.warn(
"VPWS circuits are only allowed to have two terminations. "
f"VPWS circuits are only allowed to have "
f"{self._vpws_authorized_terminations_n} terminations. "
f"{o.getName()} has {len(terminations)} terminations, ignoring..."
)
return False
Expand Down
2 changes: 1 addition & 1 deletion cosmo/tests/test_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_l2vpn_errors():
'__typename': 'L2VPNTerminationType',
'assigned_object': {}
}]})
with pytest.warns(UserWarning, match="VPWS circuits are only allowed to have two terminations"):
with pytest.warns(UserWarning, match="VPWS circuits are only allowed to have 2 terminations"):
serialize(vpws_incorrect_terminations)

unsupported_type_terminations = copy.deepcopy(template)
Expand Down

0 comments on commit 1190b88

Please sign in to comment.