Exemple #1
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()
Exemple #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()
Exemple #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()
Exemple #4
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()