def test_list_nodes_full_image_obj(self): conn = MockConn(MockImage()) with patch('salt.cloud.clouds.openstack._get_ips', return_value=[]): ret = openstack.list_nodes_full(conn=conn) self.assertEqual(ret[conn.node.name]['image'], MockImage.name)
def test_list_nodes_full_image_str(self): node_image = 'node image' conn = MockConn(node_image) with patch('salt.cloud.clouds.openstack._get_ips', return_value=[]): ret = openstack.list_nodes_full(conn=conn) self.assertEqual(ret[conn.node.name]['image'], node_image)