~ubuntu-branches/ubuntu/vivid/ceilometer/vivid

« back to all changes in this revision

Viewing changes to ceilometer/tests/ipmi/test_manager.py

  • Committer: Package Import Robot
  • Author(s): James Page, Corey Bryant, James Page
  • Date: 2015-02-19 14:59:07 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20150219145907-9jojybdsl64zcn14
Tags: 2015.1~b2-0ubuntu1
[ Corey Bryant ]
* New upstream release.
  - d/control: Align requirements with upstream.
  - d/p/skip-test.patch: Rebased.

[ James Page ]
* d/rules,d/p/skip-gabbi.patch: Skip tests that rely on python-gabbi until
  packaging and MIR is complete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2014 Intel Corp.
2
 
#
3
 
# Author: Zhai Edwin <edwin.zhai@intel.com>
4
 
#
5
 
# Licensed under the Apache License, Version 2.0 (the "License"); you may
6
 
# not use this file except in compliance with the License. You may obtain
7
 
# a copy of the License at
8
 
#
9
 
#      http://www.apache.org/licenses/LICENSE-2.0
10
 
#
11
 
# Unless required by applicable law or agreed to in writing, software
12
 
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
 
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
 
# License for the specific language governing permissions and limitations
15
 
# under the License.
16
 
"""Tests for ceilometer/ipmi/manager.py
17
 
"""
18
 
 
19
 
from ceilometer.ipmi import manager
20
 
 
21
 
import mock
22
 
from oslotest import base
23
 
 
24
 
from ceilometer.tests.agent import agentbase
25
 
 
26
 
 
27
 
class TestManager(base.BaseTestCase):
28
 
 
29
 
    @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
30
 
    def test_load_plugins(self):
31
 
        mgr = manager.AgentManager()
32
 
        self.assertIsNotNone(list(mgr.extensions))
33
 
 
34
 
 
35
 
class TestRunTasks(agentbase.BaseAgentManagerTestCase):
36
 
 
37
 
    @staticmethod
38
 
    def create_manager():
39
 
        return manager.AgentManager()
40
 
 
41
 
    def setUp(self):
42
 
        self.source_resources = True
43
 
        super(TestRunTasks, self).setUp()