def setUp(self): name = 'benchmark' params = dict() params[mut.VLAN_SENDER] = '1' params[mut.VLAN_RECEIVER] = '2' common.BASE_DIR = os.getcwd() self.benchmark = mut.RFC2544ThroughputBenchmark(name, params)
def test__get_results_for_success_2(self, mock_common_file_line): name = 'benchmark' params = {'packet_size': '128'} self.benchmark = mut.RFC2544ThroughputBenchmark(name, params) self.benchmark.results_file = 'base_dir/experimental_framework/' \ 'packet_generators/dpdk_pktgen/' \ 'experiment.res' mock_common_file_line.return_value = '1XXX0' expected = {'throughput': 0} output = self.benchmark._get_results() self.assertEqual(expected, output) mock_common_file_line.\ assert_called_once_with('base_dir/experimental_framework/' 'packet_generators/dpdk_pktgen/' 'experiment.res')
def setUp(self): name = 'benchmark' params = {'packet_size': '128'} common.BASE_DIR = os.getcwd() self.benchmark = mut.RFC2544ThroughputBenchmark(name, params)