Skip to content

Commit

Permalink
Update unit tests for VerifyBGPPeerCount
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-baillargeon committed Oct 25, 2024
1 parent c26fb82 commit 01b26a0
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 412 deletions.
9 changes: 8 additions & 1 deletion anta/tests/routing/bgp_input_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,17 @@ def validate_inputs(self) -> Self:
@property
def eos_key(self) -> str:
"""AFI/SAFI EOS key representation."""
# Pydantic handles the validation of the AFI/SAFI combination, so we can ignore error handling here.
return AFI_SAFI_EOS_KEY[(self.afi, self.safi)]

def __str__(self) -> str:
"""Return a string representation of the BgpAddressFamily model. Used in failure messages."""
"""Return a string representation of the BgpAddressFamily model. Used in failure messages.
Examples
--------
- AFI:ipv4 SAFI:unicast VRF:default
- AFI:evpn
"""
base_string = f"AFI:{self.afi}"
if self.safi is not None:
base_string += f" SAFI:{self.safi}"
Expand Down
Loading

0 comments on commit 01b26a0

Please sign in to comment.