コード例 #1
0
ファイル: test_zfs.py プロジェクト: yutiansut/salt
 def test_property_data_zfs(self):
     '''
     Test parsing of zfs get output
     '''
     with patch.object(zfs, '_zfs_cmd', MagicMock(return_value='/sbin/zfs')):
         with patch.object(zfs, '_zpool_cmd', MagicMock(return_value='/sbin/zpool')):
             with patch.object(zfs, '_exec', MagicMock(return_value=self.pmap_exec_zfs)):
                 self.assertEqual(zfs.property_data_zfs(), self.pmap_zfs)
コード例 #2
0
 def test_property_data_zfs(self):
     """
     Test parsing of zfs get output
     """
     with patch.object(zfs, "_zfs_cmd",
                       MagicMock(return_value="/sbin/zfs")):
         with patch.object(zfs, "_zpool_cmd",
                           MagicMock(return_value="/sbin/zpool")):
             with patch.object(zfs, "_exec",
                               MagicMock(return_value=self.pmap_exec_zfs)):
                 self.assertEqual(zfs.property_data_zfs(), self.pmap_zfs)