poppy/tests/unit/storage/mockdb/test_services.py
Malini Kamalambal 29a407ab42 Delete service (delete endpoint)
Change-Id: I014a6551b2a49d6d41dd1074fb2ede31cec608d0
:w
2014-10-22 16:27:51 -04:00

44 lines
1.3 KiB
Python

# Copyright (c) 2014 Rackspace, Inc.
#
# 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 uuid
from oslo.config import cfg
from poppy.storage.mockdb import driver
from poppy.storage.mockdb import services
from tests.unit import base
class MockDBStorageFlavorsTests(base.TestCase):
def setUp(self):
super(MockDBStorageFlavorsTests, self).setUp()
self.flavor_id = uuid.uuid1()
# create mocked config and driver
conf = cfg.ConfigOpts()
mockdb_driver = driver.MockDBStorageDriver(conf)
# stubbed driver
self.sc = services.ServicesController(mockdb_driver)
self.project_id = "fake_project_id"
self.service_name = "fake_service_name"
def test_delete_service(self):
self.assertTrue(self.sc.delete(self.project_id, self.service_name)
== '')