kiwi-el8/test/unit/partitioner_base_test.py
Marcus Schäfer f954861f89 Added support for hybrid GPT
Embedding an MBR into a GPT is required for a collection of
boards, e.g arm rapberry PI. The kiwi configuration provides
a new attribute called

    <type ... gpt_hybrid_mbr="true|false"

which allows to control if the GPT should be hybrid or not.
On build procedures which do not create a GPT the attribute
has no effect. This references Issue #17
2016-03-18 21:41:14 +01:00

34 lines
809 B
Python

from mock import patch
import mock
from .test_helper import *
from kiwi.partitioner.base import PartitionerBase
from kiwi.exceptions import *
class TestPartitionerBase(object):
def setup(self):
disk_provider = mock.Mock()
disk_provider.get_device = mock.Mock(
return_value='/dev/loop0'
)
self.partitioner = PartitionerBase(disk_provider)
def test_get_id(self):
assert self.partitioner.get_id() == 0
@raises(NotImplementedError)
def test_create(self):
self.partitioner.create('name', 100, 'type', ['flag'])
@raises(NotImplementedError)
def test_set_flag(self):
self.partitioner.set_flag(1, 'flag')
@raises(NotImplementedError)
def test_set_hybrid_mbr(self):
self.partitioner.set_hybrid_mbr()