-
- with mock.patch('functest.utils.openstack_utils.get_endpoint',
- return_value=ODLTesting._neutron_url):
- if exception:
- self.test.run_suites = mock.Mock(side_effect=exception)
- else:
- self.test.run_suites = mock.Mock(return_value=status)
- self.assertEqual(self.test.run(), status)
- self.test.run_suites.assert_called_once_with(
- odl.ODLTests.default_suites,
- neutronurl=self._neutron_url,
- odlip=odlip, odlpassword=self._odl_password,
- odlrestconfport=odlrestconfport,
- odlusername=self._odl_username, odlwebport=odlwebport,
- osauthurl=self._os_auth_url,
- ospassword=self._os_password,
- osprojectname=self._os_projectname,
- osusername=self._os_username,
- osprojectdomainname=self._os_projectdomainname,
- osuserdomainname=self._os_userdomainname)
-
+ if exception:
+ self.test.run_suites = mock.Mock(side_effect=exception)
+ else:
+ self.test.run_suites = mock.Mock(return_value=status)
+ self.assertEqual(self.test.run(), status)
+ self.test.run_suites.assert_called_once_with(
+ odl.ODLTests.default_suites, neutronurl=self._neutron_url,
+ odlip=odlip, odlpassword=self._odl_password,
+ odlrestconfport=odlrestconfport, odlusername=self._odl_username,
+ odlwebport=odlwebport, osauthurl=self._os_auth_url,
+ ospassword=self._os_password, osprojectname=self._os_projectname,
+ osusername=self._os_username,
+ osprojectdomainname=self._os_projectdomainname,
+ osuserdomainname=self._os_userdomainname)
+ args[0].assert_called_once_with()
+ args[1].assert_called_once_with(mock.ANY, 'network')
+
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_endpoint',
+ return_value=ODLTesting._neutron_url)
+ @mock.patch('functest.opnfv_tests.openstack.snaps.snaps_utils.'
+ 'get_credentials')