Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:napalm-automation/napalm-eos int…
Browse files Browse the repository at this point in the history
…o dbarrosop/napalm_base_0.18.0
  • Loading branch information
dbarrosop committed Nov 1, 2016
2 parents d6e26a0 + 0002e4c commit 48ac159
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion report.json

This file was deleted.

1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
future
coveralls
pytest
pytest-cov
Expand Down
13 changes: 12 additions & 1 deletion test/unit/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test fixtures."""
from builtins import super

import pytest
from napalm_base.test import conftest as parent_conftest
Expand All @@ -16,7 +17,7 @@ def fin():
request.addfinalizer(fin)

request.cls.driver = eos.EOSDriver
request.cls.fake_driver = FakeEOSDevice
request.cls.patched_driver = PatchedEOSDriver
request.cls.vendor = 'eos'
parent_conftest.set_device_parameters(request)

Expand All @@ -26,6 +27,16 @@ def pytest_generate_tests(metafunc):
parent_conftest.pytest_generate_tests(metafunc, __file__)


class PatchedEOSDriver(eos.EOSDriver):
"""Patched EOS Driver."""

def __init__(self, hostname, username, password, timeout=60, optional_args=None):
super().__init__(hostname, username, password, timeout, optional_args)

self.patched_attrs = ['device']
self.device = FakeEOSDevice()


class FakeEOSDevice(BaseTestDouble):
"""EOS device test double."""

Expand Down
1 change: 1 addition & 0 deletions test/unit/utils/textfsm_templates

0 comments on commit 48ac159

Please sign in to comment.