changed the mock data naming of files removed :

This commit is contained in:
Edward Zambrano committed 2015-12-08 15:51:38 +01:00
1 parent 43e7040500
commit fdcb289e6e
2 files changed
+3 -4

No files matched your search

+3 -4
View File
@@ -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(' ', '_'))))
config_block.replace(' ', '_'))))