Beispiel #1
0
 def test__umount(self):
     '''
     Test umounting and cleanning temporary place.
     '''
     states_mock = {
         'mount.unmounted': MagicMock(),
     }
     utils_mock = {
         'files.rm_rf': MagicMock(),
     }
     with patch.dict(btrfs.__states__, states_mock), \
             patch.dict(btrfs.__utils__, utils_mock):
         btrfs._umount('/tmp/xxx')
         states_mock['mount.unmounted'].assert_called_with('/tmp/xxx')
         utils_mock['files.rm_rf'].assert_called_with('/tmp/xxx')
Beispiel #2
0
 def test__umount(self):
     """
     Test umounting and cleanning temporary place.
     """
     states_mock = {
         "mount.unmounted": MagicMock(),
     }
     utils_mock = {
         "files.rm_rf": MagicMock(),
     }
     with patch.dict(btrfs.__states__,
                     states_mock), patch.dict(btrfs.__utils__, utils_mock):
         btrfs._umount("/tmp/xxx")
         states_mock["mount.unmounted"].assert_called_with("/tmp/xxx")
         utils_mock["files.rm_rf"].assert_called_with("/tmp/xxx")