39e035fba1
Manila server has support of list with services. This commit adds possibility to use this API of Manila. Change-Id: Ib01168941713ceb7224618def20d8115656a21cd
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
# Copyright 2013 OpenStack LLC.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
import mock
|
|
import unittest
|
|
|
|
from manilaclient.v1 import services
|
|
|
|
|
|
class ServicesTest(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
super(ServicesTest, self).setUp()
|
|
self.manager = services.ServiceManager(api=None)
|
|
|
|
def test_list(self):
|
|
with mock.patch.object(self.manager, '_list',
|
|
mock.Mock(return_value=None)):
|
|
self.manager.list()
|
|
self.manager._list.assert_called_once_with(
|
|
services.RESOURCES_PATH,
|
|
services.RESOURCES_NAME)
|