Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Test case for connected routes #162

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions napalm_base/test/getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,22 @@ def test_get_route_to(self, test_case):

return get_route_to

@wrap_test_cases
def test_get_route_to_connected(self, test_case):
"""Test get_route_to."""
destination = '1.0.4.0/24'
protocol = 'connected'
get_route_to_connected = self.device.get_route_to(destination=destination,
protocol=protocol)

assert len(get_route_to_connected) > 0

for prefix, routes in get_route_to_connected.items():
for route in routes:
assert helpers.test_model(models.route, route)

return get_route_to_connected

@wrap_test_cases
def test_get_snmp_information(self, test_case):
"""Test get_snmp_information."""
Expand Down