This repository has been archived by the owner on Sep 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from napalm-automation/develop
Release 0.5.3
- Loading branch information
Showing
9 changed files
with
93 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ pytest-json | |
pytest-pythonpath | ||
pylama | ||
flake8-import-order | ||
mock | ||
-r requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
napalm-base>=0.18.0 | ||
napalm-base>=0.24.0 | ||
pynxos | ||
netaddr | ||
future | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
"""Tests for getters.""" | ||
|
||
from napalm_base.test.getters import BaseTestGetters | ||
|
||
from napalm_base.test.getters import BaseTestGetters, wrap_test_cases | ||
from napalm_base.test import helpers | ||
from napalm_base.test import models | ||
|
||
import pytest | ||
from mock import patch | ||
|
||
|
||
def mock_time(): | ||
return 1500000000.000000 | ||
|
||
|
||
@pytest.mark.usefixtures("set_device_parameters") | ||
class TestGetter(BaseTestGetters): | ||
"""Test get_* methods.""" | ||
@patch('time.time', mock_time) | ||
@wrap_test_cases | ||
def test_get_interfaces(self, test_case): | ||
"""Test get_interfaces.""" | ||
get_interfaces = self.device.get_interfaces() | ||
assert len(get_interfaces) > 0 | ||
|
||
for interface, interface_data in get_interfaces.items(): | ||
assert helpers.test_model(models.interface, interface_data) | ||
|
||
return get_interfaces |