From c2e4fd3b7c29ab341d690247410a57d7f700b5a1 Mon Sep 17 00:00:00 2001 From: Edward Zambrano Date: Tue, 8 Dec 2015 15:24:27 +0100 Subject: [PATCH] changed the mock data naming of files --- test/unit/TestFortiOSDriver.py | 2 +- ...sys_mem_|_grep_Mem:.txt => diag_hard_sys_mem__grep_Mem:.txt} | 0 ...p_neighbors_10.15.2.101_received-routes__grep_prefixes_.txt} | 0 ...p_neighbors_10.15.2.105_received-routes__grep_prefixes_.txt} | 0 ...gp_neighbors_10.15.2.99_received-routes__grep_prefixes_.txt} | 0 ...em_dns_|_grep_domain.txt => get_system_dns__grep_domain.txt} | 0 ...nterface_|_grep_==.txt => get_system_interface__grep_==.txt} | 0 ...grep_cpu.txt => get_system_performance_status__grep_cpu.txt} | 0 8 files changed, 1 insertion(+), 1 deletion(-) rename test/unit/fortios/mock_data/{diag_hard_sys_mem_|_grep_Mem:.txt => diag_hard_sys_mem__grep_Mem:.txt} (100%) rename test/unit/fortios/mock_data/{get_router_info_bgp_neighbors_10.15.2.101_received-routes_|_grep_prefixes_.txt => get_router_info_bgp_neighbors_10.15.2.101_received-routes__grep_prefixes_.txt} (100%) rename test/unit/fortios/mock_data/{get_router_info_bgp_neighbors_10.15.2.105_received-routes_|_grep_prefixes_.txt => get_router_info_bgp_neighbors_10.15.2.105_received-routes__grep_prefixes_.txt} (100%) rename test/unit/fortios/mock_data/{get_router_info_bgp_neighbors_10.15.2.99_received-routes_|_grep_prefixes_.txt => get_router_info_bgp_neighbors_10.15.2.99_received-routes__grep_prefixes_.txt} (100%) rename test/unit/fortios/mock_data/{get_system_dns_|_grep_domain.txt => get_system_dns__grep_domain.txt} (100%) rename test/unit/fortios/mock_data/{get_system_interface_|_grep_==.txt => get_system_interface__grep_==.txt} (100%) rename test/unit/fortios/mock_data/{get_system_performance_status_|_grep_cpu.txt => get_system_performance_status__grep_cpu.txt} (100%) diff --git a/test/unit/TestFortiOSDriver.py b/test/unit/TestFortiOSDriver.py index 52ca2b5..6368167 100644 --- a/test/unit/TestFortiOSDriver.py +++ b/test/unit/TestFortiOSDriver.py @@ -58,7 +58,7 @@ class FakeFortiOSDevice: return data_file.read().splitlines() def execute_command(self, command): - return self.read_txt_file('fortios/mock_data/{}.txt'.format(command.replace(' ', '_'))) + return self.read_txt_file('fortios/mock_data/{}.txt'.format(command.replace(' ', '_').replace('|', ''))) def load_config(self, config_block): self.running_config = FortiConfig('running') 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 diff --git a/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.101_received-routes_|_grep_prefixes_.txt b/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.101_received-routes__grep_prefixes_.txt similarity index 100% rename from test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.101_received-routes_|_grep_prefixes_.txt rename to test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.101_received-routes__grep_prefixes_.txt diff --git a/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.105_received-routes_|_grep_prefixes_.txt b/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.105_received-routes__grep_prefixes_.txt similarity index 100% rename from test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.105_received-routes_|_grep_prefixes_.txt rename to test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.105_received-routes__grep_prefixes_.txt diff --git a/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.99_received-routes_|_grep_prefixes_.txt b/test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.99_received-routes__grep_prefixes_.txt similarity index 100% rename from test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.99_received-routes_|_grep_prefixes_.txt rename to test/unit/fortios/mock_data/get_router_info_bgp_neighbors_10.15.2.99_received-routes__grep_prefixes_.txt diff --git a/test/unit/fortios/mock_data/get_system_dns_|_grep_domain.txt b/test/unit/fortios/mock_data/get_system_dns__grep_domain.txt similarity index 100% rename from test/unit/fortios/mock_data/get_system_dns_|_grep_domain.txt rename to test/unit/fortios/mock_data/get_system_dns__grep_domain.txt diff --git a/test/unit/fortios/mock_data/get_system_interface_|_grep_==.txt b/test/unit/fortios/mock_data/get_system_interface__grep_==.txt similarity index 100% rename from test/unit/fortios/mock_data/get_system_interface_|_grep_==.txt rename to test/unit/fortios/mock_data/get_system_interface__grep_==.txt diff --git a/test/unit/fortios/mock_data/get_system_performance_status_|_grep_cpu.txt b/test/unit/fortios/mock_data/get_system_performance_status__grep_cpu.txt similarity index 100% rename from test/unit/fortios/mock_data/get_system_performance_status_|_grep_cpu.txt rename to test/unit/fortios/mock_data/get_system_performance_status__grep_cpu.txt