예제 #1
0
 def test_subvolume_set_default(self):
     '''
     Test btrfs subvolume set-default
     '''
     salt_mock = {
         'cmd.run_all': MagicMock(return_value={'recode': 0}),
     }
     with patch.dict(btrfs.__salt__, salt_mock):
         assert btrfs.subvolume_set_default('257', '/mnt')
         salt_mock['cmd.run_all'].assert_called_once()
         salt_mock['cmd.run_all'].assert_called_with(
             ['btrfs', 'subvolume', 'set-default', '257', '/mnt'])
예제 #2
0
 def test_subvolume_set_default(self):
     """
     Test btrfs subvolume set-default
     """
     salt_mock = {
         "cmd.run_all": MagicMock(return_value={"recode": 0}),
     }
     with patch.dict(btrfs.__salt__, salt_mock):
         assert btrfs.subvolume_set_default("257", "/mnt")
         salt_mock["cmd.run_all"].assert_called_once()
         salt_mock["cmd.run_all"].assert_called_with(
             ["btrfs", "subvolume", "set-default", "257", "/mnt"])