예제 #1
0
파일: test_main.py 프로젝트: 0day-ci/ceph
    def test_list_all_partitions(self):
        disk = "Xda"
        partition = "Xda1"

        with patch(
                'ceph_disk.main.os',
                listdir=lambda path: [disk],
        ), patch.multiple(
            main,
            list_partitions=lambda dev: [partition],
        ):
                assert {disk: [partition]} == main.list_all_partitions()
예제 #2
0
    def test_list_all_partitions(self):
        disk = "Xda"
        partition = "Xda1"

        with patch(
                'ceph_disk.main.os',
                listdir=lambda path: [disk],
        ), patch.multiple(
                main,
                list_partitions=lambda dev: [partition],
        ):
            assert {disk: [partition]} == main.list_all_partitions()
예제 #3
0
    def test_list_all_partitions(self):
        if platform.system() == "FreeBSD":
            return

        disk = "Xda"
        partition = "Xda1"

        with patch(
                'ceph_disk.main.os',
                listdir=lambda path: [disk],
        ), patch.multiple(
                main,
                list_partitions=lambda dev: [partition],
        ):
            assert {disk: [partition]} == main.list_all_partitions()
예제 #4
0
파일: test_main.py 프로젝트: tchaikov/ceph
    def test_list_all_partitions(self):
        if platform.system() == "FreeBSD":
            return

        disk = "Xda"
        partition = "Xda1"

        with patch(
                'ceph_disk.main.os',
                listdir=lambda path: [disk],
        ), patch.multiple(
            main,
            list_partitions=lambda dev: [partition],
        ):
                assert {disk: [partition]} == main.list_all_partitions()