コード例 #1
0
 def test_abspaths_are_included(self, tmpfile):
     sda_path = tmpfile(name='sda', contents='')
     directory = os.path.dirname(sda_path)
     result = disk.get_dev_devs(directory)
     assert sorted(result.keys()) == sorted(['sda', sda_path])
     assert result['sda'] == sda_path
     assert result[sda_path] == 'sda'
コード例 #2
0
ファイル: test_disk.py プロジェクト: ShiqiCooperation/ceph
 def test_abspaths_are_included(self, tmpfile):
     sda_path = tmpfile(name='sda', contents='')
     directory = os.path.dirname(sda_path)
     result = disk.get_dev_devs(directory)
     assert sorted(result.keys()) == sorted(['sda', sda_path])
     assert result['sda'] == sda_path
     assert result[sda_path] == 'sda'