コード例 #1
0
 def test_parses_whitespace_values(self):
     output = 'NAME="sdaa5" PARTLABEL="ceph data" RM="0" SIZE="10M" RO="0" TYPE="part"'
     result = disk._lsblk_parser(output)
     assert result['PARTLABEL'] == 'ceph data'
コード例 #2
0
ファイル: test_disk.py プロジェクト: ShiqiCooperation/ceph
 def test_parses_whitespace_values(self):
     output = 'NAME="sdaa5" PARTLABEL="ceph data" RM="0" SIZE="10M" RO="0" TYPE="part"'
     result = disk._lsblk_parser(output)
     assert result['PARTLABEL'] == 'ceph data'
コード例 #3
0
 def test_ignores_bogus_pairs(self):
     output = 'NAME="sdaa5" PARTLABEL RM="0" SIZE="10M" RO="0" TYPE="part" MOUNTPOINT=""'
     result = disk._lsblk_parser(output)
     assert result['SIZE'] == '10M'
コード例 #4
0
ファイル: test_disk.py プロジェクト: ShiqiCooperation/ceph
 def test_ignores_bogus_pairs(self):
     output = 'NAME="sdaa5" PARTLABEL RM="0" SIZE="10M" RO="0" TYPE="part" MOUNTPOINT=""'
     result = disk._lsblk_parser(output)
     assert result['SIZE'] == '10M'