mirror of
https://github.com/napalm-automation-community/napalm-vyos.git
synced 2026-09-22 12:11:15 +00:00
Add tests for get_config
Add test cases for normal and sanitized versions. Add support for config mode in mock device.
This commit is contained in:
@@ -51,7 +51,16 @@ class PatchedVyOSDriver(vyos.VyOSDriver):
|
||||
class FakeVyOSDevice(BaseTestDouble):
|
||||
"""VyOS device test double."""
|
||||
|
||||
def __init__(self):
|
||||
self.mode_config = False
|
||||
|
||||
def send_command(self, command, **kwargs):
|
||||
filename = '{}.text'.format(self.sanitize_text(command))
|
||||
full_path = self.find_file(filename)
|
||||
return self.read_txt_file(full_path)
|
||||
|
||||
def config_mode(self):
|
||||
self.mode_config = True
|
||||
|
||||
def exit_config_mode(self):
|
||||
self.mode_config = False
|
||||
|
||||
Reference in New Issue
Block a user