예제 #1
0
 def test_del_rw(self):
     with mock.patch('os.chmod') as mock_chmod,\
             mock.patch('os.remove') as mock_remove:
         del_rw(None, None, None)
         self.assertTrue(mock_chmod.called)
         self.assertTrue(mock_remove.called)
예제 #2
0
 def test_del_rw(self, mocker):
     mock_chmod = mocker.patch("os.chmod")
     mock_remove = mocker.patch("os.remove")
     del_rw(None, None, None)
     assert mock_chmod.called is True
     assert mock_remove.called is True
예제 #3
0
 def test_del_rw(self):
     with mock.patch('os.chmod') as mock_chmod,\
             mock.patch('os.remove') as mock_remove:
         del_rw(None, None, None)
         self.assertTrue(mock_chmod.called)
         self.assertTrue(mock_remove.called)