コード例 #1
0
 def test_collect_kpi(self):
     with mock.patch("yardstick.ssh.SSH") as ssh:
         vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
         ssh_mock = mock.Mock(autospec=ssh.SSH)
         ssh_mock.execute = \
             mock.Mock(return_value=(0, "", ""))
         ssh.from_node.return_value = ssh_mock
         vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
         trex_traffic_gen = TrexTrafficGenRFC(vnfd)
         restult = trex_traffic_gen.collect_kpi()
         self.assertEqual({}, restult)
コード例 #2
0
 def test_collect_kpi(self, ssh):
     mock_ssh(ssh)
     trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
     self.assertIsNone(trex_traffic_gen.collect_kpi())