From fdcb289e6e3c05e0b535a40cf4dd99809fbced6b Mon Sep 17 00:00:00 2001 From: Edward Zambrano Date: Tue, 8 Dec 2015 15:51:38 +0100 Subject: [PATCH] changed the mock data naming of files removed : --- test/unit/TestFortiOSDriver.py | 7 +++---- ..._mem__grep_Mem:.txt => diag_hard_sys_mem__grep_Mem.txt} | 0 2 files changed, 3 insertions(+), 4 deletions(-) rename test/unit/fortios/mock_data/{diag_hard_sys_mem__grep_Mem:.txt => diag_hard_sys_mem__grep_Mem.txt} (100%) diff --git a/test/unit/TestFortiOSDriver.py b/test/unit/TestFortiOSDriver.py index 6368167..68f6715 100644 --- a/test/unit/TestFortiOSDriver.py +++ b/test/unit/TestFortiOSDriver.py @@ -20,7 +20,6 @@ from pyFG.fortios import FortiConfig class TestConfigFortiOSDriver(unittest.TestCase, TestConfigNetworkDriver): - @classmethod def setUpClass(cls): hostname = '192.168.76.13' @@ -33,7 +32,6 @@ class TestConfigFortiOSDriver(unittest.TestCase, TestConfigNetworkDriver): class TestGetterFortiOSDriver(unittest.TestCase, TestGettersNetworkDriver): - @classmethod def setUpClass(cls): cls.mock = True @@ -58,9 +56,10 @@ class FakeFortiOSDevice: return data_file.read().splitlines() def execute_command(self, command): - return self.read_txt_file('fortios/mock_data/{}.txt'.format(command.replace(' ', '_').replace('|', ''))) + return self.read_txt_file( + 'fortios/mock_data/{}.txt'.format(command.replace(' ', '_').replace('|', '').replace(':', ''))) def load_config(self, config_block): self.running_config = FortiConfig('running') self.running_config.parse_config_output(self.read_txt_file('fortios/mock_data/{}.txt'.format( - config_block.replace(' ', '_')))) \ No newline at end of file + config_block.replace(' ', '_')))) diff --git a/test/unit/fortios/mock_data/diag_hard_sys_mem__grep_Mem:.txt b/test/unit/fortios/mock_data/diag_hard_sys_mem__grep_Mem.txt similarity index 100% rename from test/unit/fortios/mock_data/diag_hard_sys_mem__grep_Mem:.txt rename to test/unit/fortios/mock_data/diag_hard_sys_mem__grep_Mem.txt