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:
1 parent
5ab6f4de21
commit
7107560f84
7 files changed
+505
No files matched your search
@@ -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