예제 #1
0
파일: test_zfs.py 프로젝트: yutiansut/salt
 def test_property_data_zpool(self):
     '''
     Test parsing of zpool 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_zpool)):
                 self.assertEqual(zfs.property_data_zpool(), self.pmap_zpool)
예제 #2
0
 def test_property_data_zpool(self):
     """
     Test parsing of zpool 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_zpool)):
                 self.assertEqual(zfs.property_data_zpool(),
                                  self.pmap_zpool)