]>
git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-volume/ceph_volume/tests/util/test_encryption.py
1 from ceph_volume
.util
import encryption
4 class TestStatus(object):
6 def test_skips_unuseful_lines(self
, stub_call
):
7 out
= ['some line here', ' device: /dev/sdc1']
8 stub_call((out
, '', 0))
9 assert encryption
.status('/dev/sdc1') == {'device': '/dev/sdc1'}
11 def test_removes_extra_quotes(self
, stub_call
):
12 out
= ['some line here', ' device: "/dev/sdc1"']
13 stub_call((out
, '', 0))
14 assert encryption
.status('/dev/sdc1') == {'device': '/dev/sdc1'}
16 def test_ignores_bogus_lines(self
, stub_call
):
17 out
= ['some line here', ' ']
18 stub_call((out
, '', 0))
19 assert encryption
.status('/dev/sdc1') == {}