def test_upload_complete(self): mock_removal_service = mock.create_autospec(RemovalService) print mock_removal_service reference = UploadService(mock_removal_service) reference.upload_complete('my upload file') mock_removal_service.rm.assert_called_with('my upload file')
def test_upload_complete(self,mock_rm): removal_service = RemovalService() reference = UploadService(removal_service) reference.upload_complete('my upload file') mock_rm.assert_called_with('my upload file') removal_service.rm.assert_called_with('my upload file')