eb164336c5
* Changes NotificationHandler base to be a object and the tests to inherit it like a mixin, test_invalid method fails if not due to duplicate test id. * Changes backend tests to use scenarios and special NSD4 tests puts the setUp logic into a fixture which is loaded for the NSD4 backend tests. * Remove any get_*_service call into start_service(name) which uses a fixture ServiceFixture that automatically cleans up the service upon teardown (no more sprinkling tearDowns all over the tests to stop a service). * Use fixture for database. Removes storage.setup_schema and teardown_schema. * Fix cleanup of notifications. * Use fixture for Policy instead of in teardown(). bug #1256728 Change-Id: I72a53eed9e81d3f014015aa443582de21a4e66ee
27 lines
1008 B
Python
27 lines
1008 B
Python
# Copyright 2012 Hewlett-Packard Development Company, L.P. All Rights Reserved.
|
|
#
|
|
# Author: Kiall Mac Innes <kiall@hp.com>
|
|
#
|
|
# 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.
|
|
from designate.tests.test_agent import AgentTestCase
|
|
|
|
|
|
class AgentServiceTest(AgentTestCase):
|
|
def setUp(self):
|
|
super(AgentServiceTest, self).setUp()
|
|
self.service = self.start_service('agent')
|
|
|
|
def test_stop(self):
|
|
# NOTE: Start is already done by the fixture in start_service()
|
|
self.service.stop()
|