ff0fbf5810
unittest2 backports some nice features from newer versions of unittest for python 2.7 (like assertRaises context manager). Moreover tests now are using either oslotest or testtools directly, switching to one test framework is going to simplify tests. Change-Id: Ibce9403b20958f9db2a59db9c6b7479a4fc57857 Implements blueprint: volume-manager-refactoring
27 lines
878 B
Python
27 lines
878 B
Python
# Copyright 2014 Mirantis, 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 unittest2
|
|
|
|
from fuel_agent import errors
|
|
from fuel_agent.objects import image
|
|
|
|
|
|
class TestImage(unittest2.TestCase):
|
|
|
|
def test_unsupported_container(self):
|
|
self.assertRaises(errors.WrongImageDataError, image.Image, 'uri',
|
|
'dev', 'format', 'unsupported')
|