Created
April 19, 2017 17:42
-
-
Save ktbyers/c5f351321c7b761a3557489713116e28 to your computer and use it in GitHub Desktop.
NAPALM transition signatures
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
class BaseTestGetters(object): | |
"""Base class for testing drivers.""" | |
def test_method_signatures(self): | |
"""Test that all methods have the same signature.""" | |
# Method signatures that are migrating from old to new state (temporary state) | |
TRANSITION_SIGNATURES = [ | |
'commit_config', | |
'commit_confirm', | |
] | |
errors = {} | |
cls = self.driver | |
# Create fictional driver instance (py3 needs bound methods) | |
tmp_obj = cls(hostname='test', username='admin', password='pwd') | |
attrs = [m for m, v in inspect.getmembers(tmp_obj)] | |
for attr in attrs: | |
if attr in TRANSITION_SIGNATURES: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment