"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "octavia/tests/unit/amphorae/backends/agent/api_server/test_keepalivedlvs.py" between
octavia-7.1.1.tar.gz and octavia-8.0.0.tar.gz

About: OpenStack Octavia is an operator-grade reference implementation for Load Balancing as a Service (LBaaS).
The "Wallaby" series (latest release).

test_keepalivedlvs.py  (octavia-7.1.1):test_keepalivedlvs.py  (octavia-8.0.0)
skipping to change at line 31 skipping to change at line 31
class KeepalivedLvsTestCase(base.TestCase): class KeepalivedLvsTestCase(base.TestCase):
FAKE_ID = uuidutils.generate_uuid() FAKE_ID = uuidutils.generate_uuid()
def setUp(self): def setUp(self):
super().setUp() super().setUp()
self.test_keepalivedlvs = keepalivedlvs.KeepalivedLvs() self.test_keepalivedlvs = keepalivedlvs.KeepalivedLvs()
@mock.patch.object(keepalivedlvs, "webob") @mock.patch.object(keepalivedlvs, "webob")
@mock.patch('os.path.exists') @mock.patch('os.path.exists')
def test_delete_udp_listener_not_exist(self, m_exist, m_webob): def test_delete_lvs_listener_not_exist(self, m_exist, m_webob):
m_exist.return_value = False m_exist.return_value = False
self.test_keepalivedlvs.delete_udp_listener(self.FAKE_ID) self.test_keepalivedlvs.delete_lvs_listener(self.FAKE_ID)
calls = [ calls = [
mock.call( mock.call(
json=dict(message='UDP Listener Not Found', json=dict(message='UDP Listener Not Found',
details="No UDP listener with UUID: " details="No UDP listener with UUID: "
"{0}".format(self.FAKE_ID)), status=404), "{0}".format(self.FAKE_ID)), status=404),
mock.call(json={'message': 'OK'}) mock.call(json={'message': 'OK'})
] ]
m_webob.Response.assert_has_calls(calls) m_webob.Response.assert_has_calls(calls)
@mock.patch('octavia.amphorae.backends.agent.api_server.util.' @mock.patch('octavia.amphorae.backends.agent.api_server.util.'
'get_os_init_system') 'get_os_init_system')
@mock.patch('octavia.amphorae.backends.agent.api_server.util.' @mock.patch('octavia.amphorae.backends.agent.api_server.util.'
'get_keepalivedlvs_pid') 'get_keepalivedlvs_pid')
@mock.patch('subprocess.check_output') @mock.patch('subprocess.check_output')
@mock.patch('os.remove') @mock.patch('os.remove')
@mock.patch('os.path.exists') @mock.patch('os.path.exists')
def test_delete_udp_listener_unsupported_sysinit(self, m_exist, m_remove, def test_delete_lvs_listener_unsupported_sysinit(self, m_exist, m_remove,
m_check_output, mget_pid, m_check_output, mget_pid,
m_init_sys): m_init_sys):
m_exist.return_value = True m_exist.return_value = True
mget_pid.return_value = '0' mget_pid.return_value = '0'
self.assertRaises( self.assertRaises(
util.UnknownInitError, self.test_keepalivedlvs.delete_udp_listener, util.UnknownInitError,
self.test_keepalivedlvs.delete_lvs_listener,
self.FAKE_ID) self.FAKE_ID)
 End of changes. 4 change blocks. 
4 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)